invalidate Analyser on didClose

This commit is contained in:
Techatrix 2023-05-21 22:56:42 +02:00
parent 668d82d440
commit a64b63333a

View File

@ -819,6 +819,9 @@ fn saveDocumentHandler(server: *Server, notification: types.DidSaveTextDocumentP
} }
fn closeDocumentHandler(server: *Server, notification: types.DidCloseTextDocumentParams) error{}!void { 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); server.document_store.closeDocument(notification.textDocument.uri);
} }