diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js index da1a4cee..897ef035 100644 --- a/lib/ace/layer/text.js +++ b/lib/ace/layer/text.js @@ -306,7 +306,7 @@ var Text = function(parentEl) { if(row > lastRow) break; - html.push("
") + html.push("
"); // Get the tokens per line as there might be some lines in between // beeing folded. // OPTIMIZE: If there is a long block of unfolded lines, just make @@ -314,7 +314,7 @@ var Text = function(parentEl) { var tokens = this.session.getTokens(row, row); if (tokens.length == 1) this.$renderLine(html, row, tokens[0].tokens); - html.push("
") + html.push("
"); row++; } @@ -353,11 +353,11 @@ var Text = function(parentEl) { } } else { screenColumn += 1; - return "" + c + ""; + return "" + c + ""; } - } + }; var output = value.replace(replaceReg, replaceFunc); @@ -369,7 +369,7 @@ var Text = function(parentEl) { stringBuilder.push(output); } return value.length; - } + }; this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits) { var chars = 0, @@ -419,7 +419,7 @@ var Text = function(parentEl) { addToken(token, value); } } - }; + } if (this.showInvisibles) { if (lastRow !== this.session.getLength() - 1) { @@ -429,16 +429,16 @@ var Text = function(parentEl) { } } stringBuilder.push(""); - } + }; this.$renderLine = function(stringBuilder, row, tokens) { // Check if the line to render is folded or not. If not, things are // simple, otherwise, we need to fake some things... if (!this.session.isRowFolded(row)) { var splits = this.session.getRowSplitData(row); - this.$renderLineCore(stringBuilder, row, tokens, splits) + this.$renderLineCore(stringBuilder, row, tokens, splits); } else { - this.$renderFoldLine(stringBuilder, row, tokens, splits); + this.$renderFoldLine(stringBuilder, row, tokens); } }; @@ -450,8 +450,8 @@ var Text = function(parentEl) { function addTokens(tokens, from, to) { var idx = 0, col = 0; while ((col + tokens[idx].value.length) < from) { - col += tokens[idx].value.length - idx++ + col += tokens[idx].value.length; + idx++; if (idx == tokens.length) { return; @@ -470,7 +470,7 @@ var Text = function(parentEl) { }); col = from + value.length; - idx += 1 + idx += 1; } while (col < to) {