631
private _getCharCode(nodePos: NodePosition): number {
632
if (nodePos.remainder === nodePos.node.piece.length) {
633
>
// the char we want to fetch is at the head of next node.
pieceTreeBase.ts
634
>
const matchingNode = nodePos.node.next();
635
>
if (!matchingNode) {
636
return 0;
637
}
639
>
const buffer = this._buffers[matchingNode.piece.bufferIndex];
640
>
const startOffset = this.offsetInBuffer(matchingNode.piece.bufferIndex, matchingNode.piece.start);
641
>
return buffer.buffer.charCodeAt(startOffset);
642
} else {
643
const buffer = this._buffers[nodePos.node.piece.bufferIndex];