Fix a crash in an anonymous buffer that copilot is writing to. (#60377)

This commit is contained in:
Nathan Shively-Sanders 2024-10-30 15:36:19 -07:00 committed by GitHub
parent 21618934bf
commit da15ef2841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -632,6 +632,7 @@ export class LineNode implements LineCollection {
walk(rangeStart: number, rangeLength: number, walkFns: LineIndexWalker): void {
// assume (rangeStart < this.totalChars) && (rangeLength <= this.totalChars)
if (this.children.length === 0) return;
let childIndex = 0;
let childCharCount = this.children[childIndex].charCount();
// find sub-tree containing start