From 9f1d8af9373e8e474db8cdc7f456316287128e25 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 14 Jan 2012 21:09:25 +0400 Subject: [PATCH] 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 --- lib/ace/virtual_renderer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 81aded8a..fbc2ecaa 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -459,10 +459,11 @@ var VirtualRenderer = function(container, theme) { this.$gutterLayer.update(this.layerConfig); } else if (changes & this.CHANGE_LINES) { - this.$updateLines(); - this.$updateScrollBar(); - if (this.showGutter) - this.$gutterLayer.update(this.layerConfig); + if (this.$updateLines()) { + this.$updateScrollBar(); + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + } } else if (changes & this.CHANGE_GUTTER) { if (this.showGutter) this.$gutterLayer.update(this.layerConfig); @@ -581,6 +582,7 @@ var VirtualRenderer = function(container, theme) { // else update only the changed rows this.$textLayer.updateLines(layerConfig, firstRow, lastRow); + return true; }; this.$getLongestLine = function() {