1471
this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line - 1, column: startOffset - prevStartOffset };
1472
}
1474
>
this._buffers[0].lineStarts = (<number[]>this._buffers[0].lineStarts).concat(<number[]>lineStarts.slice(1));
1475
>
const endIndex = this._buffers[0].lineStarts.length - 1;
1476
>
const endColumn = this._buffers[0].buffer.length - this._buffers[0].lineStarts[endIndex];
1477
>
const newEnd = { line: endIndex, column: endColumn };
1478
>
const newLength = node.piece.length + value.length;
1479
>
const oldLineFeedCnt = node.piece.lineFeedCnt;
1480
>
const newLineFeedCnt = this.getLineFeedCnt(0, node.piece.start, newEnd);
1481
>
const lf_delta = newLineFeedCnt - oldLineFeedCnt;
1482
>
1483
>
node.piece = new Piece(
1484
>
node.piece.bufferIndex,
1485
>
node.piece.start,
1486
>
newEnd,
1487
>
newLineFeedCnt,
1488
>
newLength
1489
>
);
1490
>
1491
>
this._lastChangeBufferPos = newEnd;
1492
>
updateTreeMetadata(this, node, value.length, lf_delta);
1493
>
}
1494
1495
private nodeAt(offset: number): NodePosition {