destory notebook should clear both core and ext host.

This commit is contained in:
rebornix
2020-01-26 19:37:17 -08:00
parent ed12c87dfa
commit f4938e31fc
4 changed files with 31 additions and 4 deletions

View File

@@ -413,4 +413,26 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
}
}
async $destoryNotebookDocument(viewType: string, uri: URI): Promise<boolean> {
let provider = this._notebookProviders.get(viewType);
if (provider) {
let document = this._documents.get(URI.revive(uri).toString());
if (document) {
this._documents.delete(URI.revive(uri).toString());
}
let editor = this._editors.get(URI.revive(uri).toString());
if (editor) {
this._editors.delete(URI.revive(uri).toString());
}
return true;
}
return false;
}
}