--- a/openide.text/src/org/openide/text/CloneableEditorSupport.java +++ a/openide.text/src/org/openide/text/CloneableEditorSupport.java @@ -1135,7 +1135,7 @@ } Runnable beforeSaveRunnable = (Runnable) myDoc.getProperty("beforeSaveRunnable"); - if (beforeSaveRunnable != null) { + if (beforeSaveRunnable != null && !getUndoRedo().isInProgress()) { // Create runnable that marks next edit fired from document as save actions. // This assumes that before save tasks will run in a single atomic edit. // At the end of the edit an actual save task will be done.