Skip to content

Commit 1f8c354

Browse files
mjbvzsandy081
authored andcommitted
Always clear diagnostics for a js/ts file when it closes
Fixes microsoft#59363 Fixes microsoft#58088 Reopens microsoft#47386
1 parent a4a2342 commit 1f8c354

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

extensions/typescript-language-features/src/features/bufferSyncSupport.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as fs from 'fs';
76
import * as vscode from 'vscode';
87
import * as Proto from '../protocol';
98
import { ITypeScriptServiceClient } from '../typescriptService';
@@ -266,10 +265,8 @@ export default class BufferSyncSupport extends Disposable {
266265
this.pendingDiagnostics.delete(resource);
267266
this.syncedBuffers.delete(resource);
268267
syncedBuffer.close();
269-
if (!fs.existsSync(resource.fsPath)) {
270-
this._onDelete.fire(resource);
271-
this.requestAllDiagnostics();
272-
}
268+
this._onDelete.fire(resource);
269+
this.requestAllDiagnostics();
273270
}
274271

275272
public interuptGetErr<R>(f: () => R): R {

0 commit comments

Comments
 (0)