avoid revert if it is not dirty

This commit is contained in:
rebornix
2020-07-01 14:38:33 -07:00
parent 102a9e5e44
commit 69c2da0dd4

View File

@@ -133,7 +133,7 @@ export class NotebookEditorInput extends EditorInput {
}
async revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
if (this._textModel) {
if (this._textModel && this._textModel.object.isDirty()) {
await this._textModel.object.revert(options);
}