remove more manual cursor positioning
This commit is contained in:
parent
4cc5bf9a7b
commit
cd0ebf4029
1 changed files with 4 additions and 7 deletions
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue