launch.json shows stale warnings after deleting/closing. Fixes #23726

This commit is contained in:
Martin Aeschlimann
2017-04-04 11:32:47 +02:00
parent c7593a7ff2
commit cfb74af74e

View File

@@ -276,6 +276,12 @@ connection.onDidChangeWatchedFiles((change) => {
});
let jsonDocuments = getLanguageModelCache<JSONDocument>(10, 60, document => languageService.parseJSONDocument(document));
documents.onDidClose(e => {
jsonDocuments.onDocumentRemoved(e.document);
});
connection.onShutdown(() => {
jsonDocuments.dispose();
});
function getJSONDocument(document: TextDocument): JSONDocument {
return jsonDocuments.get(document);