reset dirty state when reverting a notebook, update extension host when dirty state of a notebook (working copy) changes

This commit is contained in:
Johannes Rieken
2021-02-15 11:44:51 +01:00
parent 5236d34460
commit 196bf678a1
6 changed files with 47 additions and 16 deletions

View File

@@ -578,7 +578,14 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
}
}
public $acceptModelSaved(uriComponents: UriComponents): void {
$acceptDirtyStateChanged(resource: UriComponents, isDirty: boolean): void {
const document = this._documents.get(URI.revive(resource));
if (document) {
document.acceptModelChanged({ rawEvents: [], versionId: document.notebookDocument.version }, isDirty);
}
}
$acceptModelSaved(uriComponents: UriComponents): void {
const document = this._documents.get(URI.revive(uriComponents));
if (document) {
// this.$acceptDirtyStateChanged(uriComponents, false);