diff --git a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts index 6826005b897..82803d55639 100644 --- a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts +++ b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts @@ -118,7 +118,11 @@ class BufferSynchronizer { } } - public beforeCommand(command: string) { + public reset(): void { + this._pending.clear(); + } + + public beforeCommand(command: string): void { if (command === 'updateOpen') { return; } @@ -397,6 +401,7 @@ export default class BufferSyncSupport extends Disposable { public reset(): void { this.pendingGetErr?.cancel(); this.pendingDiagnostics.clear(); + this.synchronizer.reset(); for (const buffer of this.syncedBuffers.allBuffers) { buffer.open();