Fix onDidDeleteMarkdownDocument not hooked up (#156913)

This commit is contained in:
Matt Bierner 2022-08-02 13:18:08 -07:00 committed by GitHub
parent 1097f3e440
commit e3267b75c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,12 @@ export class VsCodeClientWorkspace implements md.IWorkspaceWithWatching {
});
documents.onDidClose(e => {
this._documentCache.delete(URI.parse(e.document.uri));
const uri = URI.parse(e.document.uri);
this._documentCache.delete(uri);
if (this.isRelevantMarkdownDocument(e.document)) {
this._onDidDeleteMarkdownDocument.fire(uri);
}
});
connection.onDidChangeWatchedFiles(async ({ changes }) => {