From 49c3f0e4bb89a0b3b4de003cc0f28188579a6e5d Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 21 Jul 2013 18:46:57 +0100 Subject: [PATCH] Consider undo history size don't just set to 1 Need to consider if we've undone back to the start instead of just setting 1 here --- editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.php b/editor.php index e1fdfa4..cf1b6e8 100644 --- a/editor.php +++ b/editor.php @@ -202,7 +202,7 @@ function createNewCMInstance(num) { window['cM'+num].on("change", function(thisCM, changeObj) { // If we're not loading the file, it's a change, so update tab if (!top.ICEcoder.loadingFile) { - top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 1; + top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = thisCM.historySize().undo > 0 ? 1 : 0; top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab); } top.ICEcoder.getCaretPosition();