From bb54642031c7cb2f03f5fbe447fd63a4f20c5931 Mon Sep 17 00:00:00 2001 From: Steffen Zschaler Date: Fri, 8 Dec 2023 20:34:07 +0000 Subject: [PATCH] Only save when dirty --- platform/src/ProgramPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/src/ProgramPanel.js b/platform/src/ProgramPanel.js index e0ef46c..3196c7d 100644 --- a/platform/src/ProgramPanel.js +++ b/platform/src/ProgramPanel.js @@ -8,7 +8,8 @@ class ProgramPanel 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()); } /**