Discard backups when the file is no longer dirty

Make content update trigger after dirty status is evaluated
This commit is contained in:
Daniel Imms
2016-09-21 11:29:13 -07:00
parent 038f756445
commit 2ded2a75ca
6 changed files with 38 additions and 17 deletions

View File

@@ -145,8 +145,6 @@ export class UntitledEditorModel extends StringEditorModel implements IEncodingS
}
private onModelContentChanged(): void {
this._onDidChangeContent.fire();
// turn dirty if we were not
if (!this.dirty) {
this.dirty = true;
@@ -159,6 +157,8 @@ export class UntitledEditorModel extends StringEditorModel implements IEncodingS
this.dirty = false;
this._onDidChangeDirty.fire();
}
this._onDidChangeContent.fire();
}
public dispose(): void {