highlighted search matches should be scrolled to
the center of the view port
This commit is contained in:
parent
aa8c14de62
commit
97444a857e
3 changed files with 10 additions and 2 deletions
|
|
@ -861,6 +861,10 @@ var Editor = function(renderer, doc) {
|
|||
}
|
||||
};
|
||||
|
||||
this.getLastSearchOptions = function() {
|
||||
return this.$search.getOptions();
|
||||
};
|
||||
|
||||
this.find = function(needle, options) {
|
||||
this.clearSelection();
|
||||
options = options || {};
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ Search.SELECTION = 2;
|
|||
oop.mixin(this.$options, options);
|
||||
return this;
|
||||
};
|
||||
|
||||
this.getOptions = function() {
|
||||
return lang.copyObject(this.$options);
|
||||
};
|
||||
|
||||
this.find = function(doc) {
|
||||
if (!this.$options.needle)
|
||||
|
|
|
|||
|
|
@ -257,11 +257,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.getFirstVisibleRow = function() {
|
||||
return this.layerConfig.firstRow || 0;
|
||||
return (this.layerConfig || {}).firstRow || 0;
|
||||
};
|
||||
|
||||
this.getLastVisibleRow = function() {
|
||||
return this.layerConfig.lastRow || 0;
|
||||
return (this.layerConfig || {}).lastRow || 0;
|
||||
};
|
||||
|
||||
this.onScroll = function(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue