Skip to content

Commit

Permalink
Fix a crash in an anonymous buffer that copilot is writing to. (#60377)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandersn authored Oct 30, 2024
1 parent 2161893 commit da15ef2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/scriptVersionCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da15ef2

Please sign in to comment.