package
This commit is contained in:
parent
b44d19ed63
commit
101644923e
7 changed files with 31 additions and 27 deletions
File diff suppressed because one or more lines are too long
|
|
@ -2701,11 +2701,7 @@ var Editor = function(renderer, session) {
|
|||
this.renderer.updateCursor();
|
||||
|
||||
if (!this.$blockScrolling) {
|
||||
var selection = this.getSelection();
|
||||
if (selection.isEmpty())
|
||||
this.renderer.scrollCursorIntoView(selection.getCursor());
|
||||
else
|
||||
this.renderer.scrollSelectionIntoView(selection.getSelectionLead(), selection.getSelectionAnchor());
|
||||
this.renderer.scrollCursorIntoView();
|
||||
}
|
||||
|
||||
// move text input over the cursor
|
||||
|
|
@ -3540,8 +3536,10 @@ var Editor = function(renderer, session) {
|
|||
return;
|
||||
|
||||
this.$tryReplace(range, replacement);
|
||||
if (range !== null)
|
||||
if (range !== null) {
|
||||
this.selection.setSelectionRange(range);
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||
}
|
||||
};
|
||||
|
||||
this.replaceAll = function(replacement, options) {
|
||||
|
|
@ -3614,6 +3612,7 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
|
@ -3625,6 +3624,8 @@ var Editor = function(renderer, session) {
|
|||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2701,11 +2701,7 @@ var Editor = function(renderer, session) {
|
|||
this.renderer.updateCursor();
|
||||
|
||||
if (!this.$blockScrolling) {
|
||||
var selection = this.getSelection();
|
||||
if (selection.isEmpty())
|
||||
this.renderer.scrollCursorIntoView(selection.getCursor());
|
||||
else
|
||||
this.renderer.scrollSelectionIntoView(selection.getSelectionLead(), selection.getSelectionAnchor());
|
||||
this.renderer.scrollCursorIntoView();
|
||||
}
|
||||
|
||||
// move text input over the cursor
|
||||
|
|
@ -3540,8 +3536,10 @@ var Editor = function(renderer, session) {
|
|||
return;
|
||||
|
||||
this.$tryReplace(range, replacement);
|
||||
if (range !== null)
|
||||
if (range !== null) {
|
||||
this.selection.setSelectionRange(range);
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||
}
|
||||
};
|
||||
|
||||
this.replaceAll = function(replacement, options) {
|
||||
|
|
@ -3614,6 +3612,7 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
|
@ -3625,6 +3624,8 @@ var Editor = function(renderer, session) {
|
|||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue