Lines Matching refs:lines
107 function lines_pos_to_index(lines, x, y) {
108 if (y < lines[0].top) {
111 for (const l of lines) {
116 return lines[lines.length - 1].textRange.last;
138 function lines_index_to_line_index(lines, index) {
140 for (const l of lines) {
146 return lines.length-1;
149 function lines_index_to_line(lines, index) {
150 return lines[lines_index_to_line_index(lines, index)];
153 function lines_index_to_x(lines, index) {
154 for (const l of lines) {
161 function lines_indices_to_path(lines, a, b, width) {
168 const la = lines_index_to_line(lines, a);
169 const lb = lines_index_to_line(lines, b);
178 path.addRect([0, la.bottom, width, lb.top]); // extra lines inbetween
386 // note: this does not rebuild lines/runs, or update the cursor,