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
  • Loading branch information
mjbvz authored and sandy081 committed Feb 22, 2019
1 parent a4a2342 commit 1f8c354
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 1f8c354

Please sign in to comment.