remove more manual cursor positioning

This commit is contained in:
Fabian Jakobs 2011-02-11 11:56:27 +01:00
commit cd0ebf4029

View file

@ -367,7 +367,7 @@ var Editor =function(renderer, session) {
return;
if (!this.selection.isEmpty()) {
this.moveCursorToPosition(this.session.remove(this.getSelectionRange()));
this.session.remove(this.getSelectionRange())
this.clearSelection();
}
};
@ -542,7 +542,7 @@ var Editor =function(renderer, session) {
if (this.selection.isEmpty()) {
this.selection.selectRight();
}
this.moveCursorToPosition(this.session.remove(this.getSelectionRange()));
this.session.remove(this.getSelectionRange())
this.clearSelection();
};
@ -553,7 +553,7 @@ var Editor =function(renderer, session) {
if (this.selection.isEmpty())
this.selection.selectLeft();
this.moveCursorToPosition(this.session.remove(this.getSelectionRange()));
this.session.remove(this.getSelectionRange());
this.clearSelection();
};
@ -605,10 +605,7 @@ var Editor =function(renderer, session) {
return;
var rows = this.$getSelectedRows();
this.selection.setSelectionAnchor(rows.last+1, 0);
this.selection.selectTo(rows.first, 0);
this.session.remove(this.getSelectionRange());
this.session.remove(new Range(rows.first, 0, rows.last+1, 0));
this.clearSelection();
};