From 7ddb4d728c641c74657a944b0f1d1d07c351bce3 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Sat, 25 Sep 2010 12:23:24 +0200 Subject: [PATCH] fix undo manager --- src/ace/Document.js | 2 +- src/ace/commands/DefaultCommands.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ace/Document.js b/src/ace/Document.js index f6474764..cbc06d33 100644 --- a/src/ace/Document.js +++ b/src/ace/Document.js @@ -501,7 +501,7 @@ var Document = function(text, mode) { this.undoChanges = function(deltas) { this.selection.clearSelection(); - for (var i=0; i=0; i--) { var delta = deltas[i]; if (delta.action == "insertText") { this.remove(delta.range, true); diff --git a/src/ace/commands/DefaultCommands.js b/src/ace/commands/DefaultCommands.js index a3a79150..6c4b9b94 100644 --- a/src/ace/commands/DefaultCommands.js +++ b/src/ace/commands/DefaultCommands.js @@ -34,7 +34,7 @@ PluginManager.registerCommand("find", function(editor, selection) { editor.find(needle); }); PluginManager.registerCommand("undo", function(editor, selection) { - editor.undo(); + editor.undo(); }); PluginManager.registerCommand("redo", function(editor, selection) { editor.redo();