From ca7bccd17163511e5dda372abe842fdfd4c1f390 Mon Sep 17 00:00:00 2001 From: Joel Moniz Date: Sat, 22 Aug 2015 14:04:58 +0530 Subject: [PATCH] Make auto-format into a compund edit --- app/src/processing/app/ui/Editor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/processing/app/ui/Editor.java b/app/src/processing/app/ui/Editor.java index 8c0586521..c0e1e9b48 100644 --- a/app/src/processing/app/ui/Editor.java +++ b/app/src/processing/app/ui/Editor.java @@ -2207,6 +2207,7 @@ public abstract class Editor extends JFrame implements RunnerListener { if (formattedText.equals(source)) { statusNotice(Language.text("editor.status.autoformat.no_changes")); } else { + startCompoundEdit(); // replace with new bootiful text // selectionEnd hopefully at least in the neighborhood int scrollPos = textarea.getVerticalScrollPosition(); @@ -2227,6 +2228,7 @@ public abstract class Editor extends JFrame implements RunnerListener { textarea.setVerticalScrollPosition(scrollPos); // } } + stopCompoundEdit(); getSketch().setModified(true); // mark as finished statusNotice(Language.text("editor.status.autoformat.finished"));