highlighted search matches should be scrolled to

the center of the view port
This commit is contained in:
Fabian Jakobs 2010-10-01 15:20:15 +02:00
commit 97444a857e
3 changed files with 10 additions and 2 deletions

View file

@ -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 || {};

View file

@ -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)

View file

@ -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) {