diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 8f169def..24d4bd06 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -300,10 +300,10 @@ var VirtualRenderer = function(container, theme) { this.resizing++; else this.resizing = force ? 1 : 0; - if (!height) height = dom.getInnerHeight(this.container); - if (force || size.height != height) { + + if (height && (force || size.height != height)) { size.height = height; this.scroller.style.height = height + "px"; @@ -318,7 +318,8 @@ var VirtualRenderer = function(container, theme) { if (!width) width = dom.getInnerWidth(this.container); - if (force || this.resizing > 1 || size.width != width) { + + if (width && (force || this.resizing > 1 || size.width != width)) { size.width = width; var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;