fix undo manager

This commit is contained in:
Fabian Jakobs 2010-09-25 12:23:24 +02:00
commit 7ddb4d728c
2 changed files with 2 additions and 2 deletions

View file

@ -501,7 +501,7 @@ var Document = function(text, mode) {
this.undoChanges = function(deltas) {
this.selection.clearSelection();
for (var i=0; i<deltas.length; i++) {
for (var i=deltas.length-1; i>=0; i--) {
var delta = deltas[i];
if (delta.action == "insertText") {
this.remove(delta.range, true);

View file

@ -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();