Skip to content

Commit

Permalink
Always clear diagnostics for a js/ts file when it closes
Browse files Browse the repository at this point in the history
Fixes #59363
Fixes #58088
Reopens #47386
  • Loading branch information
mjbvz committed Feb 21, 2019
1 parent 360e653 commit 553e6e4
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 553e6e4

Please sign in to comment.