From 5b465da4e3f73ec1088da0832c5b1e8a24b38eef Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 25 Nov 2010 10:11:50 +0100 Subject: [PATCH] fix render update when scrolling and text changes happen at the same time --- lib/ace/virtual_renderer.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 6c82f5d2..6568de8d 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -357,18 +357,13 @@ var VirtualRenderer = function(container, theme) { // scrolling if (changes & this.CHANGE_SCROLL) { - 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 { + if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(this.layerConfig); - this.showGutter && this.$gutterLayer.update(this.layerConfig); - this.$markerLayer.update(this.layerConfig); - this.$cursorLayer.update(this.layerConfig); - } + else + this.$textLayer.scrollLines(this.layerConfig); + this.showGutter && this.$gutterLayer.update(this.layerConfig); + this.$markerLayer.update(this.layerConfig); + this.$cursorLayer.update(this.layerConfig); this.$updateScrollBar(); return; }