modify navigateUp/Down behavior only if selection is multiline
This commit is contained in:
parent
af8149098c
commit
10ab6c3779
1 changed files with 2 additions and 2 deletions
|
|
@ -1800,7 +1800,7 @@ var Editor = function(renderer, session) {
|
|||
*
|
||||
**/
|
||||
this.navigateUp = function(times) {
|
||||
if (!this.selection.isEmpty() && !this.selection.isBackwards()) {
|
||||
if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
|
||||
var selectionStart = this.selection.anchor.getPosition();
|
||||
return this.moveCursorToPosition(selectionStart);
|
||||
}
|
||||
|
|
@ -1816,7 +1816,7 @@ var Editor = function(renderer, session) {
|
|||
*
|
||||
**/
|
||||
this.navigateDown = function(times) {
|
||||
if (!this.selection.isEmpty() && this.selection.isBackwards()) {
|
||||
if (this.selection.isMultiLine() && this.selection.isBackwards()) {
|
||||
var selectionEnd = this.selection.anchor.getPosition();
|
||||
return this.moveCursorToPosition(selectionEnd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue