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); }