diff --git a/lib/ace/anchor.js b/lib/ace/anchor.js index ddaef873..1be42e22 100644 --- a/lib/ace/anchor.js +++ b/lib/ace/anchor.js @@ -135,11 +135,11 @@ var Anchor = exports.Anchor = function(doc, row, column) { this.setPosition = function(row, column) { pos = this.$clipPositionToDocument(row, column); - if (this.row == row && this.column == column) + if (this.row == pos.row && this.column == pos.column) return; - this.row = row; - this.column = column; + this.row = pos.row; + this.column = pos.column; this._dispatchEvent("change"); }; diff --git a/lib/ace/selection.js b/lib/ace/selection.js index e271f0ea..8e6d4b73 100644 --- a/lib/ace/selection.js +++ b/lib/ace/selection.js @@ -406,7 +406,7 @@ var Selection = function(session) { this.moveCursorTo = function(row, column, preventUpdateDesiredColumn) { this.selectionLead.setPosition(row, column); if (!preventUpdateDesiredColumn) - this.$updateDesiredColumn(column); + this.$updateDesiredColumn(this.selectionLead.column); }; }).call(Selection.prototype);