From d776e309350c1ba562a55d1d4b74b746013fb5da Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Fri, 11 Feb 2011 08:20:33 +0100 Subject: [PATCH] tab to spaces --- lib/ace/virtual_renderer.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index a80e80d8..02ea0745 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -643,21 +643,21 @@ var VirtualRenderer = function(container, theme) { }; this.showComposition = function(position) { - if (!this.$composition) { - this.$composition = document.createElement("div"); + if (!this.$composition) { + this.$composition = document.createElement("div"); this.$composition.className = "ace_composition"; this.content.appendChild(this.$composition); - } - + } + this.$composition.innerHTML = " "; - + var pos = this.$cursorLayer.getPixelPosition(); - var style = this.$composition.style; - style.top = pos.top + "px"; - style.left = (pos.left + this.$padding) + "px"; - style.height = this.lineHeight + "px"; - - this.hideCursor(); + var style = this.$composition.style; + style.top = pos.top + "px"; + style.left = (pos.left + this.$padding) + "px"; + style.height = this.lineHeight + "px"; + + this.hideCursor(); }; this.setCompositionText = function(text) { @@ -665,14 +665,14 @@ var VirtualRenderer = function(container, theme) { }; this.hideComposition = function() { - this.showCursor(); + this.showCursor(); if (!this.$composition) return; - var style = this.$composition.style; - style.top = "-10000px"; - style.left = "-10000px"; + var style = this.$composition.style; + style.top = "-10000px"; + style.left = "-10000px"; }; this.setTheme = function(theme) {