Make sure synchronized buffers are reset when tsserver restarts

This commit is contained in:
Matt Bierner 2019-11-11 14:19:01 -08:00
parent e1d887932e
commit 6118d2713e

View file

@ -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();