Always clear diagnostics for a js/ts file when it closes

Fixes #59363
Fixes #58088
Reopens #47386
This commit is contained in:
Matt Bierner
2019-02-21 10:42:18 -08:00
parent 360e653864
commit 553e6e4f79

View File

@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import * as vscode from 'vscode';
import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService';
@@ -266,10 +265,8 @@ export default class BufferSyncSupport extends Disposable {
this.pendingDiagnostics.delete(resource);
this.syncedBuffers.delete(resource);
syncedBuffer.close();
if (!fs.existsSync(resource.fsPath)) {
this._onDelete.fire(resource);
this.requestAllDiagnostics();
}
this._onDelete.fire(resource);
this.requestAllDiagnostics();
}
public interuptGetErr<R>(f: () => R): R {