diff --git a/lib/ace/range.js b/lib/ace/range.js index 8f22285d..23f7b236 100644 --- a/lib/ace/range.js +++ b/lib/ace/range.js @@ -115,6 +115,26 @@ var Range = function(startRow, startColumn, endRow, endColumn) { return this.start.row == row && this.start.column == column; } + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + } + + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + } + this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { diff --git a/lib/ace/undomanager.js b/lib/ace/undomanager.js index 5cb8e78b..66debe14 100644 --- a/lib/ace/undomanager.js +++ b/lib/ace/undomanager.js @@ -49,6 +49,7 @@ var UndoManager = function() { var deltas = options.args[0]; this.$doc = options.args[1]; this.$undoStack.push(deltas); + this.$redoStack = []; }; this.undo = function() {