1274
x = x.left;
1275
} else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {
1276
>
const prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
pieceTreeBase.ts
1277
>
const accumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);
1278
>
const buffer = this._buffers[x.piece.bufferIndex].buffer;
1279
>
const startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
1280
>
nodeStartOffset += x.size_left;
1281
>
this._searchCache.set({
1282
>
node: x,
1283
>
nodeStartOffset,
1284
>
nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left)
1285
>
});
1286
>
1287
>
return buffer.substring(startOffset + prevAccumulatedValue, startOffset + accumulatedValue - endOffset);
1288
} else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {
1289
const prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);