fix render update when scrolling and text changes happen at the same time

This commit is contained in:
Fabian Jakobs 2010-11-25 10:11:50 +01:00
commit 5b465da4e3

View file

@ -357,18 +357,13 @@ var VirtualRenderer = function(container, theme) {
// scrolling // scrolling
if (changes & this.CHANGE_SCROLL) { if (changes & this.CHANGE_SCROLL) {
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) { if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.scrollLines(this.layerConfig);
this.showGutter && this.$gutterLayer.update(this.layerConfig);
this.$markerLayer.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
}
else {
this.$textLayer.update(this.layerConfig); this.$textLayer.update(this.layerConfig);
this.showGutter && this.$gutterLayer.update(this.layerConfig); else
this.$markerLayer.update(this.layerConfig); this.$textLayer.scrollLines(this.layerConfig);
this.$cursorLayer.update(this.layerConfig); this.showGutter && this.$gutterLayer.update(this.layerConfig);
} this.$markerLayer.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar(); this.$updateScrollBar();
return; return;
} }