find and undo must center selection into view
This commit is contained in:
parent
6799599306
commit
621c7c3dc8
2 changed files with 18 additions and 12 deletions
|
|
@ -982,7 +982,7 @@ var Editor = function(renderer, session) {
|
|||
this.renderer.animateScrolling(function() {
|
||||
renderer.scrollBy(0, rows * config.lineHeight);
|
||||
if (select != null)
|
||||
renderer.scrollCursorIntoView();
|
||||
renderer.scrollCursorIntoView(null, 0.5);
|
||||
}, this);
|
||||
};
|
||||
|
||||
|
|
@ -1262,17 +1262,23 @@ var Editor = function(renderer, session) {
|
|||
this.$blockScrolling -= 1;
|
||||
|
||||
this.renderer.animateScrolling(function() {
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||
this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
|
||||
}, this);
|
||||
}
|
||||
};
|
||||
|
||||
this.undo = function() {
|
||||
this.$blockScrolling++;
|
||||
this.session.getUndoManager().undo();
|
||||
this.$blockScrolling--;
|
||||
renderer.scrollCursorIntoView(null, 0.5);
|
||||
};
|
||||
|
||||
this.redo = function() {
|
||||
this.$blockScrolling++;
|
||||
this.session.getUndoManager().redo();
|
||||
this.$blockScrolling--;
|
||||
renderer.scrollCursorIntoView(null, 0.5);
|
||||
};
|
||||
|
||||
this.destroy = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue