diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js index 1c1a6264..4651687d 100644 --- a/lib/ace/layer/text.js +++ b/lib/ace/layer/text.js @@ -145,6 +145,7 @@ var Text = function(parentEl) { this.updateLines = function(layerConfig, firstRow, lastRow) { this.$computeTabString(); + this.config = layerConfig; var first = Math.max(firstRow, layerConfig.firstRow); var last = Math.min(lastRow, layerConfig.lastRow); @@ -234,6 +235,7 @@ var Text = function(parentEl) { this.update = function(config) { this.$computeTabString(); + this.config = config; var html = []; var _self = this; diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 6568de8d..f1bac711 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -61,14 +61,14 @@ var VirtualRenderer = function(container, theme) { this.setTheme(theme); - this.scroller = document.createElement("div"); - this.scroller.className = "ace_scroller"; - this.container.appendChild(this.scroller); - this.$gutter = document.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); + this.scroller = document.createElement("div"); + this.scroller.className = "ace_scroller"; + this.container.appendChild(this.scroller); + this.content = document.createElement("div"); this.content.style.position = "absolute"; this.scroller.appendChild(this.content); @@ -375,10 +375,6 @@ var VirtualRenderer = function(container, theme) { else if (changes & this.CHANGE_LINES) { this.$updateLines(); this.$updateScrollBar(); - } - else if (changes & this.CHANGE_SCROLL) { - this.$textLayer.scrollLines(this.layerConfig); - this.showGutter && this.$gutterLayer.update(this.layerConfig); } if (changes & this.CHANGE_GUTTER) { this.showGutter && this.$gutterLayer.update(this.layerConfig); }