diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index af5fa53e..ac1991ab 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -471,12 +471,13 @@ var VirtualRenderer = function(container, theme) { this.$computeLayerConfig = function() { var session = this.session; + var config = this.layerConfig var offset = this.scrollTop % this.lineHeight; var minHeight = this.$size.scrollerHeight + this.lineHeight; var longestLine = this.$getLongestLine(); - var widthChanged = this.layerConfig.width != longestLine; + var widthChanged = config.width != longestLine; var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0; var horizScrollChanged = this.$horizScroll !== horizScroll; @@ -512,19 +513,17 @@ var VirtualRenderer = function(container, theme) { offset = this.scrollTop - firstRowScreen * this.lineHeight; - this.layerConfig = { - width : longestLine, - padding : this.$padding, - firstRow : firstRow, - firstRowScreen: firstRowScreen, - lastRow : lastRow, - lineHeight : this.lineHeight, - characterWidth : this.characterWidth, - minHeight : minHeight, - maxHeight : maxHeight, - offset : offset, - height : this.$size.scrollerHeight - }; + config.width = longestLine; + config.padding = this.$padding; + config.firstRow = firstRow; + config.firstRowScreen = firstRowScreen; + config.lastRow = lastRow; + config.lineHeight = this.lineHeight; + config.characterWidth = this.characterWidth; + config.minHeight = minHeight; + config.maxHeight = maxHeight; + config.offset = offset; + config.height = this.$size.scrollerHeight; // For debugging. // console.log(JSON.stringify(this.layerConfig));