Merge pull request #1197 from Techatrix/invalidate-analysis-cache

invalidate Analyser on didClose
This commit is contained in:
Lee Cannon 2023-05-21 15:31:40 -07:00 committed by GitHub
commit 2ff2593a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -805,6 +805,9 @@ fn saveDocumentHandler(server: *Server, notification: types.DidSaveTextDocumentP
}
fn closeDocumentHandler(server: *Server, notification: types.DidCloseTextDocumentParams) error{}!void {
// cached type info may point to a closed handle
server.analyser.invalidate();
server.document_store.closeDocument(notification.textDocument.uri);
}