on CHANGE_LINES update gutter only if visible lines changed

otherwise it's impossible to click on foldwidget after typing at the start of big document
This commit is contained in:
nightwing 2012-01-14 21:09:25 +04:00
commit 9f1d8af937

View file

@ -459,10 +459,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig); this.$gutterLayer.update(this.layerConfig);
} }
else if (changes & this.CHANGE_LINES) { else if (changes & this.CHANGE_LINES) {
this.$updateLines(); if (this.$updateLines()) {
this.$updateScrollBar(); this.$updateScrollBar();
if (this.showGutter) if (this.showGutter)
this.$gutterLayer.update(this.layerConfig); this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) { } else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter) if (this.showGutter)
this.$gutterLayer.update(this.layerConfig); this.$gutterLayer.update(this.layerConfig);
@ -581,6 +582,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows // else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow); this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
}; };
this.$getLongestLine = function() { this.$getLongestLine = function() {