Skip to content

Commit f94d326

Browse files
authored
Merge pull request microsoft#134189 from yume-chan/patch-1
fix: avoid stack overflow when loading bracket guides for large files
2 parents ab718d5 + f682b21 commit f94d326

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/editor/common/model/textModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,8 @@ export class TextModel extends Disposable implements model.ITextModel, IDecorati
18001800
}
18011801

18021802
public getAllDecorations(ownerId: number = 0, filterOutValidation: boolean = false): model.IModelDecoration[] {
1803-
const result = this._decorationsTree.getAll(this, ownerId, filterOutValidation, false);
1804-
result.push(...this._decorationProvider.getAllDecorations(ownerId, filterOutValidation));
1803+
let result = this._decorationsTree.getAll(this, ownerId, filterOutValidation, false);
1804+
result = result.concat(this._decorationProvider.getAllDecorations(ownerId, filterOutValidation));
18051805
return result;
18061806
}
18071807

0 commit comments

Comments
 (0)