def points
import bolt@1.27.0.0/src/lsp/enc.bend as Encimport Base
95# the chars the first u UTF-16 code units of a line cover; an offset inside
96# a pair covers its char, and one past the line's end counts one column a
97# unit
98def points(cs: List<&2, Char>, uu: Nat) -> Nat:
99 match cs uu:
100 case Nil{} _:
101 uu
102 case Con{_c, _t} 0n:
103 0n
104 case Con{c, t} 1n+p:
105 1n+points(t, points.skip(wide(c), p))