Skip to content

Commit cd6a079

Browse files
authored
1 parent be140a8 commit cd6a079

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class InlineSuggestionHintsWidget extends Disposable {
3636
private readonly widget = this._register(this.instantiationService.createInstance(InlineSuggestionHintsContentWidget, this.editor, true));
3737

3838
private sessionPosition: Position | undefined = undefined;
39+
private isDisposed = false;
3940

4041
constructor(
4142
private readonly editor: ICodeEditor,
@@ -51,7 +52,16 @@ export class InlineSuggestionHintsWidget extends Disposable {
5152
this.update();
5253
}
5354

55+
override dispose(): void {
56+
this.isDisposed = true;
57+
super.dispose();
58+
}
59+
5460
private update(): void {
61+
if (this.isDisposed) {
62+
return;
63+
}
64+
5565
const options = this.editor.getOption(EditorOption.inlineSuggest);
5666
if (options.showToolbar !== 'always' || !this.model.ghostText) {
5767
this.widget.update(null, 0, undefined, []);

0 commit comments

Comments
 (0)