Skip to content

Commit

Permalink
fix: out of date diagnostics after closing and re-opening a file (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Jan 12, 2024
1 parent 80ef614 commit f395cd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/diagnostic-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class FileDiagnostics {
}

public onDidClose(): void {
this.publishDiagnostics();
this.diagnosticsPerKind.clear();
this.publishDiagnostics();
this.closed = true;
}

Expand Down Expand Up @@ -106,6 +106,7 @@ export class DiagnosticEventQueue {
const uri = this.client.toResource(file).toString();
const diagnosticsForFile = this.diagnostics.get(uri);
diagnosticsForFile?.onDidClose();
this.diagnostics.delete(uri);
}

/**
Expand Down

0 comments on commit f395cd6

Please sign in to comment.