fix cursor clipping

This commit is contained in:
Fabian Jakobs 2011-02-11 11:41:38 +01:00
commit 9c422423af
2 changed files with 4 additions and 4 deletions

View file

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

View file

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