mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-02 14:58:43 +00:00
Fixes 146816
This commit is contained in:
@@ -569,6 +569,7 @@ export class UpdateOperation implements IDisposable {
|
||||
*/
|
||||
export class SynchronizedInlineCompletionsCache extends Disposable {
|
||||
public readonly completions: readonly CachedInlineCompletion[];
|
||||
private isDisposing = false;
|
||||
|
||||
constructor(
|
||||
completionsSource: TrackedInlineCompletions,
|
||||
@@ -588,6 +589,7 @@ export class SynchronizedInlineCompletionsCache extends Disposable {
|
||||
}))
|
||||
);
|
||||
this._register(toDisposable(() => {
|
||||
this.isDisposing = true;
|
||||
editor.deltaDecorations(decorationIds, []);
|
||||
}));
|
||||
|
||||
@@ -600,7 +602,11 @@ export class SynchronizedInlineCompletionsCache extends Disposable {
|
||||
this._register(completionsSource);
|
||||
}
|
||||
|
||||
public updateRanges() {
|
||||
public updateRanges(): void {
|
||||
if (this.isDisposing) {
|
||||
return;
|
||||
}
|
||||
|
||||
let hasChanged = false;
|
||||
const model = this.editor.getModel();
|
||||
for (const c of this.completions) {
|
||||
|
||||
Reference in New Issue
Block a user