Skip to content

Commit

Permalink
Only save when dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
szschaler authored Dec 8, 2023
1 parent bb54642 commit 60aae9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/src/XtextEditorPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class XtextEditorPanel extends Panel {
}

canSave() {
return true;
// Only save if there are any actual changes to save -- this avoids empty commits.
return !(this.editor.session.getUndoManager().isClean());
}

/**
Expand Down

0 comments on commit 60aae9e

Please sign in to comment.