From 1283b11f0ecad713370883018ea2dc36e5f0a6a5 Mon Sep 17 00:00:00 2001 From: Mostafa Eweda Date: Thu, 8 Mar 2012 20:29:21 +0200 Subject: [PATCH] Fixed a typo in placeholder that was stopping the cancel to work --- lib/ace/placeholder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/placeholder.js b/lib/ace/placeholder.js index f0fa5b46..f8141690 100644 --- a/lib/ace/placeholder.js +++ b/lib/ace/placeholder.js @@ -60,7 +60,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) this.$pos = pos; // Used for reset - this.$undoStackDepth = session.getUndoManager().$undoStack ? session.getUndoManager().$undoStack.length : -1; + this.$undoStackDepth = session.getUndoManager().$undostack ? session.getUndoManager().$undostack.length : -1; this.setup(); session.selection.on("changeCursor", this.$onCursorChange); @@ -202,7 +202,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) if(this.$undoStackDepth === -1) throw Error("Canceling placeholders only supported with undo manager attached to session."); var undoManager = this.session.getUndoManager(); - var undosRequired = undoManager.$undoStack.length - this.$undoStackDepth; + var undosRequired = undoManager.$undostack.length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { undoManager.undo(true); }