77
88import { asMappedString , MappedString , mappedString } from "../mapped-text.ts" ;
99import { rangedLines } from "../ranged-text.ts" ;
10- import { lines , rowColToIndex } from "../text.ts" ;
10+ import { lineColToIndex , lines } from "../text.ts" ;
1111import {
1212 LocateFromIndentationContext ,
1313 YamlIntelligenceContext ,
@@ -112,7 +112,7 @@ export function* attemptParsesAtLine(
112112 const currentLine = codeLines [ position . row ] . substring ;
113113 let currentColumn = position . column ;
114114 let deletions = 0 ;
115- const locF = rowColToIndex ( code . value ) ;
115+ const locF = lineColToIndex ( code . value ) ;
116116
117117 while ( currentColumn > 0 ) {
118118 currentColumn -- ;
@@ -128,15 +128,15 @@ export function* attemptParsesAtLine(
128128
129129 if ( position . column > deletions ) {
130130 chunks . push ( {
131- start : locF ( { row : position . row , column : 0 } ) ,
132- end : locF ( { row : position . row , column : position . column - deletions } ) ,
131+ start : locF ( { line : position . row , column : 0 } ) ,
132+ end : locF ( { line : position . row , column : position . column - deletions } ) ,
133133 } ) ;
134134 }
135135
136136 if ( position . row + 1 < codeLines . length ) {
137137 chunks . push ( {
138- start : locF ( { row : position . row , column : currentLine . length - 1 } ) ,
139- end : locF ( { row : position . row + 1 , column : 0 } ) ,
138+ start : locF ( { line : position . row , column : currentLine . length - 1 } ) ,
139+ end : locF ( { line : position . row + 1 , column : 0 } ) ,
140140 } ) ;
141141 chunks . push ( {
142142 start : codeLines [ position . row + 1 ] . range . start ,
0 commit comments