package
This commit is contained in:
parent
8d45513f62
commit
138f3dc3f6
4 changed files with 110 additions and 98 deletions
|
|
@ -5956,8 +5956,8 @@ var Editor =function(renderer, session) {
|
||||||
if (shouldOutdent) {
|
if (shouldOutdent) {
|
||||||
mode.autoOutdent(lineState, session, cursor.row);
|
mode.autoOutdent(lineState, session, cursor.row);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.onTextInput = function(text) {
|
this.onTextInput = function(text) {
|
||||||
this.keyBinding.onTextInput(text);
|
this.keyBinding.onTextInput(text);
|
||||||
|
|
@ -13021,7 +13021,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getShowGutter = function(){
|
this.getShowGutter = function(){
|
||||||
return this.showGutter;
|
return this.showGutter;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setShowGutter = function(show){
|
this.setShowGutter = function(show){
|
||||||
if(this.showGutter === show)
|
if(this.showGutter === show)
|
||||||
|
|
@ -13029,10 +13029,10 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$gutter.style.display = show ? "block" : "none";
|
this.$gutter.style.display = show ? "block" : "none";
|
||||||
this.showGutter = show;
|
this.showGutter = show;
|
||||||
this.onResize(true);
|
this.onResize(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$updatePrintMargin = function() {
|
this.$updatePrintMargin = function() {
|
||||||
var containerEl
|
var containerEl;
|
||||||
|
|
||||||
if (!this.$showPrintMargin && !this.$printMarginEl)
|
if (!this.$showPrintMargin && !this.$printMarginEl)
|
||||||
return;
|
return;
|
||||||
|
|
@ -13040,7 +13040,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.$printMarginEl) {
|
if (!this.$printMarginEl) {
|
||||||
containerEl = dom.createElement("div");
|
containerEl = dom.createElement("div");
|
||||||
containerEl.className = "ace_print_margin_layer";
|
containerEl.className = "ace_print_margin_layer";
|
||||||
this.$printMarginEl = dom.createElement("div")
|
this.$printMarginEl = dom.createElement("div");
|
||||||
this.$printMarginEl.className = "ace_print_margin";
|
this.$printMarginEl.className = "ace_print_margin";
|
||||||
containerEl.appendChild(this.$printMarginEl);
|
containerEl.appendChild(this.$printMarginEl);
|
||||||
this.content.insertBefore(containerEl, this.$textLayer.element);
|
this.content.insertBefore(containerEl, this.$textLayer.element);
|
||||||
|
|
@ -13087,8 +13087,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.layerConfig)
|
if (!this.layerConfig)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return this.layerConfig.firstRow + (this.layerConfig.offset == 0 ? 0 : 1);
|
return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.getLastFullyVisibleRow = function() {
|
this.getLastFullyVisibleRow = function() {
|
||||||
if (!this.layerConfig)
|
if (!this.layerConfig)
|
||||||
|
|
@ -13096,7 +13096,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
|
var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
|
||||||
return this.layerConfig.firstRow - 1 + flint;
|
return this.layerConfig.firstRow - 1 + flint;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.getLastVisibleRow = function() {
|
this.getLastVisibleRow = function() {
|
||||||
return (this.layerConfig || {}).lastRow || 0;
|
return (this.layerConfig || {}).lastRow || 0;
|
||||||
|
|
@ -13112,7 +13112,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getHScrollBarAlwaysVisible = function() {
|
this.getHScrollBarAlwaysVisible = function() {
|
||||||
return this.$horizScrollAlwaysVisible;
|
return this.$horizScrollAlwaysVisible;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
||||||
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
|
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
|
||||||
|
|
@ -13120,7 +13120,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
|
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
|
||||||
this.$loop.schedule(this.CHANGE_SCROLL);
|
this.$loop.schedule(this.CHANGE_SCROLL);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.onScroll = function(e) {
|
this.onScroll = function(e) {
|
||||||
this.scrollToY(e.data);
|
this.scrollToY(e.data);
|
||||||
|
|
@ -13148,7 +13148,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
|
|
@ -13162,7 +13163,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
else
|
else
|
||||||
this.$textLayer.scrollLines(this.layerConfig);
|
this.$textLayer.scrollLines(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
|
||||||
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
|
|
@ -13172,14 +13175,17 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
if (changes & this.CHANGE_TEXT) {
|
if (changes & this.CHANGE_TEXT) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
}
|
}
|
||||||
else if (changes & this.CHANGE_LINES) {
|
else if (changes & this.CHANGE_LINES) {
|
||||||
this.$updateLines();
|
this.$updateLines();
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
} else if (changes & this.CHANGE_GUTTER) {
|
} else if (changes & this.CHANGE_GUTTER) {
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes & this.CHANGE_CURSOR)
|
if (changes & this.CHANGE_CURSOR)
|
||||||
|
|
@ -13290,7 +13296,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
// if the last row is unknown -> redraw everything
|
// if the last row is unknown -> redraw everything
|
||||||
if (lastRow === Infinity) {
|
if (lastRow === Infinity) {
|
||||||
this.showGutter && this.$gutterLayer.update(layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(layerConfig);
|
||||||
this.$textLayer.update(layerConfig);
|
this.$textLayer.update(layerConfig);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -13320,12 +13327,12 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.addGutterDecoration = function(row, className){
|
this.addGutterDecoration = function(row, className){
|
||||||
this.$gutterLayer.addGutterDecoration(row, className);
|
this.$gutterLayer.addGutterDecoration(row, className);
|
||||||
this.$loop.schedule(this.CHANGE_GUTTER);
|
this.$loop.schedule(this.CHANGE_GUTTER);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.removeGutterDecoration = function(row, className){
|
this.removeGutterDecoration = function(row, className){
|
||||||
this.$gutterLayer.removeGutterDecoration(row, className);
|
this.$gutterLayer.removeGutterDecoration(row, className);
|
||||||
this.$loop.schedule(this.CHANGE_GUTTER);
|
this.$loop.schedule(this.CHANGE_GUTTER);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setBreakpoints = function(rows) {
|
this.setBreakpoints = function(rows) {
|
||||||
this.$gutterLayer.setBreakpoints(rows);
|
this.$gutterLayer.setBreakpoints(rows);
|
||||||
|
|
@ -13379,7 +13386,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
else
|
else
|
||||||
this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
|
|
||||||
this.getScrollTop = function() {
|
this.getScrollTop = function() {
|
||||||
return this.scrollTop;
|
return this.scrollTop;
|
||||||
|
|
@ -13395,7 +13402,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getScrollBottomRow = function() {
|
this.getScrollBottomRow = function() {
|
||||||
return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
|
return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.scrollToRow = function(row) {
|
this.scrollToRow = function(row) {
|
||||||
this.scrollToY(row * this.lineHeight);
|
this.scrollToY(row * this.lineHeight);
|
||||||
|
|
@ -13457,7 +13464,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return {
|
return {
|
||||||
pageX: canvasPos.left + x - this.getScrollLeft(),
|
pageX: canvasPos.left + x - this.getScrollLeft(),
|
||||||
pageY: canvasPos.top + y - this.getScrollTop()
|
pageY: canvasPos.top + y - this.getScrollTop()
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
this.visualizeFocus = function() {
|
this.visualizeFocus = function() {
|
||||||
|
|
@ -13503,6 +13510,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.setTheme = function(theme) {
|
this.setTheme = function(theme) {
|
||||||
var _self = this;
|
var _self = this;
|
||||||
|
|
||||||
this.$themeValue = theme;
|
this.$themeValue = theme;
|
||||||
if (!theme || typeof theme == "string") {
|
if (!theme || typeof theme == "string") {
|
||||||
theme = theme || "ace/theme/textmate";
|
theme = theme || "ace/theme/textmate";
|
||||||
|
|
@ -13513,7 +13521,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
afterLoad(theme);
|
afterLoad(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _self = this;
|
|
||||||
function afterLoad(theme) {
|
function afterLoad(theme) {
|
||||||
if (_self.$theme)
|
if (_self.$theme)
|
||||||
dom.removeCssClass(_self.container, _self.$theme);
|
dom.removeCssClass(_self.container, _self.$theme);
|
||||||
|
|
@ -13533,24 +13540,24 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getTheme = function() {
|
this.getTheme = function() {
|
||||||
return this.$themeValue;
|
return this.$themeValue;
|
||||||
}
|
};
|
||||||
|
|
||||||
// Methods allows to add / remove CSS classnames to the editor element.
|
// Methods allows to add / remove CSS classnames to the editor element.
|
||||||
// This feature can be used by plug-ins to provide a visual indication of
|
// This feature can be used by plug-ins to provide a visual indication of
|
||||||
// a certain mode that editor is in.
|
// a certain mode that editor is in.
|
||||||
|
|
||||||
this.setStyle = function setStyle(style) {
|
this.setStyle = function setStyle(style) {
|
||||||
dom.addCssClass(this.container, style)
|
dom.addCssClass(this.container, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.unsetStyle = function unsetStyle(style) {
|
this.unsetStyle = function unsetStyle(style) {
|
||||||
dom.removeCssClass(this.container, style)
|
dom.removeCssClass(this.container, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.destroy = function() {
|
this.destroy = function() {
|
||||||
this.$textLayer.destroy();
|
this.$textLayer.destroy();
|
||||||
this.$cursorLayer.destroy();
|
this.$cursorLayer.destroy();
|
||||||
}
|
};
|
||||||
|
|
||||||
}).call(VirtualRenderer.prototype);
|
}).call(VirtualRenderer.prototype);
|
||||||
|
|
||||||
|
|
@ -14187,7 +14194,7 @@ var Text = function(parentEl) {
|
||||||
if(row > lastRow)
|
if(row > lastRow)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
html.push("<div class='ace_line'>")
|
html.push("<div class='ace_line'>");
|
||||||
// Get the tokens per line as there might be some lines in between
|
// Get the tokens per line as there might be some lines in between
|
||||||
// beeing folded.
|
// beeing folded.
|
||||||
// OPTIMIZE: If there is a long block of unfolded lines, just make
|
// OPTIMIZE: If there is a long block of unfolded lines, just make
|
||||||
|
|
@ -14195,7 +14202,7 @@ var Text = function(parentEl) {
|
||||||
var tokens = this.session.getTokens(row, row);
|
var tokens = this.session.getTokens(row, row);
|
||||||
if (tokens.length == 1)
|
if (tokens.length == 1)
|
||||||
this.$renderLine(html, row, tokens[0].tokens);
|
this.$renderLine(html, row, tokens[0].tokens);
|
||||||
html.push("</div>")
|
html.push("</div>");
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
@ -14208,22 +14215,21 @@ var Text = function(parentEl) {
|
||||||
"lparen": true
|
"lparen": true
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$renderToken = function(stringBuilder, screenColumn, token, value) {
|
this.$renderToken = function(stringBuilder, screenColumn, token, value) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
|
var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
|
||||||
var replaceFunc = function(c, a, b, tabIdx, idx4) {
|
var replaceFunc = function(c, a, b, tabIdx, idx4) {
|
||||||
if (c.charCodeAt(0) == 32) {
|
if (c.charCodeAt(0) == 32) {
|
||||||
return new Array(c.length+1).join(" ");
|
return new Array(c.length+1).join(" ");
|
||||||
} else if (c == "\t") {
|
} else if (c == "\t") {
|
||||||
var tabSize = self.session.
|
var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
|
||||||
getScreenTabSize(screenColumn + tabIdx);
|
|
||||||
screenColumn += tabSize - 1;
|
screenColumn += tabSize - 1;
|
||||||
return self.$tabStrings[tabSize];
|
return self.$tabStrings[tabSize];
|
||||||
} else if (c == "&") {
|
} else if (c == "&") {
|
||||||
if (useragent.isOldGecko)
|
if (useragent.isOldGecko)
|
||||||
return "&";
|
return "&";
|
||||||
else
|
else
|
||||||
return "&";
|
return "&";
|
||||||
} else if (c == "<") {
|
} else if (c == "<") {
|
||||||
return "<";
|
return "<";
|
||||||
} else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
|
} else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
|
||||||
|
|
@ -14235,11 +14241,11 @@ var Text = function(parentEl) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
screenColumn += 1;
|
screenColumn += 1;
|
||||||
return "<span class='ace_cjk' style='width:" + (
|
return "<span class='ace_cjk' style='width:" +
|
||||||
self.config.characterWidth * 2) +
|
(self.config.characterWidth * 2) +
|
||||||
"px'>" + c + "</span>";
|
"px'>" + c + "</span>";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
var output = value.replace(replaceReg, replaceFunc);
|
var output = value.replace(replaceReg, replaceFunc);
|
||||||
|
|
||||||
|
|
@ -14251,7 +14257,7 @@ var Text = function(parentEl) {
|
||||||
stringBuilder.push(output);
|
stringBuilder.push(output);
|
||||||
}
|
}
|
||||||
return value.length;
|
return value.length;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits) {
|
this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits) {
|
||||||
var chars = 0,
|
var chars = 0,
|
||||||
|
|
@ -14301,7 +14307,7 @@ var Text = function(parentEl) {
|
||||||
addToken(token, value);
|
addToken(token, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (this.showInvisibles) {
|
if (this.showInvisibles) {
|
||||||
if (lastRow !== this.session.getLength() - 1) {
|
if (lastRow !== this.session.getLength() - 1) {
|
||||||
|
|
@ -14311,16 +14317,16 @@ var Text = function(parentEl) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stringBuilder.push("</div>");
|
stringBuilder.push("</div>");
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$renderLine = function(stringBuilder, row, tokens) {
|
this.$renderLine = function(stringBuilder, row, tokens) {
|
||||||
// Check if the line to render is folded or not. If not, things are
|
// Check if the line to render is folded or not. If not, things are
|
||||||
// simple, otherwise, we need to fake some things...
|
// simple, otherwise, we need to fake some things...
|
||||||
if (!this.session.isRowFolded(row)) {
|
if (!this.session.isRowFolded(row)) {
|
||||||
var splits = this.session.getRowSplitData(row);
|
var splits = this.session.getRowSplitData(row);
|
||||||
this.$renderLineCore(stringBuilder, row, tokens, splits)
|
this.$renderLineCore(stringBuilder, row, tokens, splits);
|
||||||
} else {
|
} else {
|
||||||
this.$renderFoldLine(stringBuilder, row, tokens, splits);
|
this.$renderFoldLine(stringBuilder, row, tokens);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -14332,8 +14338,8 @@ var Text = function(parentEl) {
|
||||||
function addTokens(tokens, from, to) {
|
function addTokens(tokens, from, to) {
|
||||||
var idx = 0, col = 0;
|
var idx = 0, col = 0;
|
||||||
while ((col + tokens[idx].value.length) < from) {
|
while ((col + tokens[idx].value.length) < from) {
|
||||||
col += tokens[idx].value.length
|
col += tokens[idx].value.length;
|
||||||
idx++
|
idx++;
|
||||||
|
|
||||||
if (idx == tokens.length) {
|
if (idx == tokens.length) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -14352,7 +14358,7 @@ var Text = function(parentEl) {
|
||||||
});
|
});
|
||||||
|
|
||||||
col = from + value.length;
|
col = from + value.length;
|
||||||
idx += 1
|
idx += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (col < to) {
|
while (col < to) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5971,8 +5971,8 @@ var Editor =function(renderer, session) {
|
||||||
if (shouldOutdent) {
|
if (shouldOutdent) {
|
||||||
mode.autoOutdent(lineState, session, cursor.row);
|
mode.autoOutdent(lineState, session, cursor.row);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.onTextInput = function(text) {
|
this.onTextInput = function(text) {
|
||||||
this.keyBinding.onTextInput(text);
|
this.keyBinding.onTextInput(text);
|
||||||
|
|
@ -13036,7 +13036,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getShowGutter = function(){
|
this.getShowGutter = function(){
|
||||||
return this.showGutter;
|
return this.showGutter;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setShowGutter = function(show){
|
this.setShowGutter = function(show){
|
||||||
if(this.showGutter === show)
|
if(this.showGutter === show)
|
||||||
|
|
@ -13044,10 +13044,10 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$gutter.style.display = show ? "block" : "none";
|
this.$gutter.style.display = show ? "block" : "none";
|
||||||
this.showGutter = show;
|
this.showGutter = show;
|
||||||
this.onResize(true);
|
this.onResize(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$updatePrintMargin = function() {
|
this.$updatePrintMargin = function() {
|
||||||
var containerEl
|
var containerEl;
|
||||||
|
|
||||||
if (!this.$showPrintMargin && !this.$printMarginEl)
|
if (!this.$showPrintMargin && !this.$printMarginEl)
|
||||||
return;
|
return;
|
||||||
|
|
@ -13055,7 +13055,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.$printMarginEl) {
|
if (!this.$printMarginEl) {
|
||||||
containerEl = dom.createElement("div");
|
containerEl = dom.createElement("div");
|
||||||
containerEl.className = "ace_print_margin_layer";
|
containerEl.className = "ace_print_margin_layer";
|
||||||
this.$printMarginEl = dom.createElement("div")
|
this.$printMarginEl = dom.createElement("div");
|
||||||
this.$printMarginEl.className = "ace_print_margin";
|
this.$printMarginEl.className = "ace_print_margin";
|
||||||
containerEl.appendChild(this.$printMarginEl);
|
containerEl.appendChild(this.$printMarginEl);
|
||||||
this.content.insertBefore(containerEl, this.$textLayer.element);
|
this.content.insertBefore(containerEl, this.$textLayer.element);
|
||||||
|
|
@ -13102,8 +13102,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.layerConfig)
|
if (!this.layerConfig)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return this.layerConfig.firstRow + (this.layerConfig.offset == 0 ? 0 : 1);
|
return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.getLastFullyVisibleRow = function() {
|
this.getLastFullyVisibleRow = function() {
|
||||||
if (!this.layerConfig)
|
if (!this.layerConfig)
|
||||||
|
|
@ -13111,7 +13111,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
|
var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
|
||||||
return this.layerConfig.firstRow - 1 + flint;
|
return this.layerConfig.firstRow - 1 + flint;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.getLastVisibleRow = function() {
|
this.getLastVisibleRow = function() {
|
||||||
return (this.layerConfig || {}).lastRow || 0;
|
return (this.layerConfig || {}).lastRow || 0;
|
||||||
|
|
@ -13127,7 +13127,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getHScrollBarAlwaysVisible = function() {
|
this.getHScrollBarAlwaysVisible = function() {
|
||||||
return this.$horizScrollAlwaysVisible;
|
return this.$horizScrollAlwaysVisible;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
||||||
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
|
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
|
||||||
|
|
@ -13135,7 +13135,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
|
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
|
||||||
this.$loop.schedule(this.CHANGE_SCROLL);
|
this.$loop.schedule(this.CHANGE_SCROLL);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.onScroll = function(e) {
|
this.onScroll = function(e) {
|
||||||
this.scrollToY(e.data);
|
this.scrollToY(e.data);
|
||||||
|
|
@ -13163,7 +13163,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
|
|
@ -13177,7 +13178,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
else
|
else
|
||||||
this.$textLayer.scrollLines(this.layerConfig);
|
this.$textLayer.scrollLines(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
|
||||||
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
|
|
@ -13187,14 +13190,17 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
if (changes & this.CHANGE_TEXT) {
|
if (changes & this.CHANGE_TEXT) {
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
}
|
}
|
||||||
else if (changes & this.CHANGE_LINES) {
|
else if (changes & this.CHANGE_LINES) {
|
||||||
this.$updateLines();
|
this.$updateLines();
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
} else if (changes & this.CHANGE_GUTTER) {
|
} else if (changes & this.CHANGE_GUTTER) {
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes & this.CHANGE_CURSOR)
|
if (changes & this.CHANGE_CURSOR)
|
||||||
|
|
@ -13305,7 +13311,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
// if the last row is unknown -> redraw everything
|
// if the last row is unknown -> redraw everything
|
||||||
if (lastRow === Infinity) {
|
if (lastRow === Infinity) {
|
||||||
this.showGutter && this.$gutterLayer.update(layerConfig);
|
if (this.showGutter)
|
||||||
|
this.$gutterLayer.update(layerConfig);
|
||||||
this.$textLayer.update(layerConfig);
|
this.$textLayer.update(layerConfig);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -13335,12 +13342,12 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.addGutterDecoration = function(row, className){
|
this.addGutterDecoration = function(row, className){
|
||||||
this.$gutterLayer.addGutterDecoration(row, className);
|
this.$gutterLayer.addGutterDecoration(row, className);
|
||||||
this.$loop.schedule(this.CHANGE_GUTTER);
|
this.$loop.schedule(this.CHANGE_GUTTER);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.removeGutterDecoration = function(row, className){
|
this.removeGutterDecoration = function(row, className){
|
||||||
this.$gutterLayer.removeGutterDecoration(row, className);
|
this.$gutterLayer.removeGutterDecoration(row, className);
|
||||||
this.$loop.schedule(this.CHANGE_GUTTER);
|
this.$loop.schedule(this.CHANGE_GUTTER);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setBreakpoints = function(rows) {
|
this.setBreakpoints = function(rows) {
|
||||||
this.$gutterLayer.setBreakpoints(rows);
|
this.$gutterLayer.setBreakpoints(rows);
|
||||||
|
|
@ -13394,7 +13401,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
else
|
else
|
||||||
this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
|
|
||||||
this.getScrollTop = function() {
|
this.getScrollTop = function() {
|
||||||
return this.scrollTop;
|
return this.scrollTop;
|
||||||
|
|
@ -13410,7 +13417,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getScrollBottomRow = function() {
|
this.getScrollBottomRow = function() {
|
||||||
return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
|
return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
|
||||||
}
|
};
|
||||||
|
|
||||||
this.scrollToRow = function(row) {
|
this.scrollToRow = function(row) {
|
||||||
this.scrollToY(row * this.lineHeight);
|
this.scrollToY(row * this.lineHeight);
|
||||||
|
|
@ -13472,7 +13479,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return {
|
return {
|
||||||
pageX: canvasPos.left + x - this.getScrollLeft(),
|
pageX: canvasPos.left + x - this.getScrollLeft(),
|
||||||
pageY: canvasPos.top + y - this.getScrollTop()
|
pageY: canvasPos.top + y - this.getScrollTop()
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
this.visualizeFocus = function() {
|
this.visualizeFocus = function() {
|
||||||
|
|
@ -13518,6 +13525,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.setTheme = function(theme) {
|
this.setTheme = function(theme) {
|
||||||
var _self = this;
|
var _self = this;
|
||||||
|
|
||||||
this.$themeValue = theme;
|
this.$themeValue = theme;
|
||||||
if (!theme || typeof theme == "string") {
|
if (!theme || typeof theme == "string") {
|
||||||
theme = theme || "ace/theme/textmate";
|
theme = theme || "ace/theme/textmate";
|
||||||
|
|
@ -13528,7 +13536,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
afterLoad(theme);
|
afterLoad(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _self = this;
|
|
||||||
function afterLoad(theme) {
|
function afterLoad(theme) {
|
||||||
if (_self.$theme)
|
if (_self.$theme)
|
||||||
dom.removeCssClass(_self.container, _self.$theme);
|
dom.removeCssClass(_self.container, _self.$theme);
|
||||||
|
|
@ -13548,24 +13555,24 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.getTheme = function() {
|
this.getTheme = function() {
|
||||||
return this.$themeValue;
|
return this.$themeValue;
|
||||||
}
|
};
|
||||||
|
|
||||||
// Methods allows to add / remove CSS classnames to the editor element.
|
// Methods allows to add / remove CSS classnames to the editor element.
|
||||||
// This feature can be used by plug-ins to provide a visual indication of
|
// This feature can be used by plug-ins to provide a visual indication of
|
||||||
// a certain mode that editor is in.
|
// a certain mode that editor is in.
|
||||||
|
|
||||||
this.setStyle = function setStyle(style) {
|
this.setStyle = function setStyle(style) {
|
||||||
dom.addCssClass(this.container, style)
|
dom.addCssClass(this.container, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.unsetStyle = function unsetStyle(style) {
|
this.unsetStyle = function unsetStyle(style) {
|
||||||
dom.removeCssClass(this.container, style)
|
dom.removeCssClass(this.container, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.destroy = function() {
|
this.destroy = function() {
|
||||||
this.$textLayer.destroy();
|
this.$textLayer.destroy();
|
||||||
this.$cursorLayer.destroy();
|
this.$cursorLayer.destroy();
|
||||||
}
|
};
|
||||||
|
|
||||||
}).call(VirtualRenderer.prototype);
|
}).call(VirtualRenderer.prototype);
|
||||||
|
|
||||||
|
|
@ -14202,7 +14209,7 @@ var Text = function(parentEl) {
|
||||||
if(row > lastRow)
|
if(row > lastRow)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
html.push("<div class='ace_line'>")
|
html.push("<div class='ace_line'>");
|
||||||
// Get the tokens per line as there might be some lines in between
|
// Get the tokens per line as there might be some lines in between
|
||||||
// beeing folded.
|
// beeing folded.
|
||||||
// OPTIMIZE: If there is a long block of unfolded lines, just make
|
// OPTIMIZE: If there is a long block of unfolded lines, just make
|
||||||
|
|
@ -14210,7 +14217,7 @@ var Text = function(parentEl) {
|
||||||
var tokens = this.session.getTokens(row, row);
|
var tokens = this.session.getTokens(row, row);
|
||||||
if (tokens.length == 1)
|
if (tokens.length == 1)
|
||||||
this.$renderLine(html, row, tokens[0].tokens);
|
this.$renderLine(html, row, tokens[0].tokens);
|
||||||
html.push("</div>")
|
html.push("</div>");
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
@ -14223,22 +14230,21 @@ var Text = function(parentEl) {
|
||||||
"lparen": true
|
"lparen": true
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$renderToken = function(stringBuilder, screenColumn, token, value) {
|
this.$renderToken = function(stringBuilder, screenColumn, token, value) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
|
var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
|
||||||
var replaceFunc = function(c, a, b, tabIdx, idx4) {
|
var replaceFunc = function(c, a, b, tabIdx, idx4) {
|
||||||
if (c.charCodeAt(0) == 32) {
|
if (c.charCodeAt(0) == 32) {
|
||||||
return new Array(c.length+1).join(" ");
|
return new Array(c.length+1).join(" ");
|
||||||
} else if (c == "\t") {
|
} else if (c == "\t") {
|
||||||
var tabSize = self.session.
|
var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
|
||||||
getScreenTabSize(screenColumn + tabIdx);
|
|
||||||
screenColumn += tabSize - 1;
|
screenColumn += tabSize - 1;
|
||||||
return self.$tabStrings[tabSize];
|
return self.$tabStrings[tabSize];
|
||||||
} else if (c == "&") {
|
} else if (c == "&") {
|
||||||
if (useragent.isOldGecko)
|
if (useragent.isOldGecko)
|
||||||
return "&";
|
return "&";
|
||||||
else
|
else
|
||||||
return "&";
|
return "&";
|
||||||
} else if (c == "<") {
|
} else if (c == "<") {
|
||||||
return "<";
|
return "<";
|
||||||
} else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
|
} else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
|
||||||
|
|
@ -14250,11 +14256,11 @@ var Text = function(parentEl) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
screenColumn += 1;
|
screenColumn += 1;
|
||||||
return "<span class='ace_cjk' style='width:" + (
|
return "<span class='ace_cjk' style='width:" +
|
||||||
self.config.characterWidth * 2) +
|
(self.config.characterWidth * 2) +
|
||||||
"px'>" + c + "</span>";
|
"px'>" + c + "</span>";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
var output = value.replace(replaceReg, replaceFunc);
|
var output = value.replace(replaceReg, replaceFunc);
|
||||||
|
|
||||||
|
|
@ -14266,7 +14272,7 @@ var Text = function(parentEl) {
|
||||||
stringBuilder.push(output);
|
stringBuilder.push(output);
|
||||||
}
|
}
|
||||||
return value.length;
|
return value.length;
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits) {
|
this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits) {
|
||||||
var chars = 0,
|
var chars = 0,
|
||||||
|
|
@ -14316,7 +14322,7 @@ var Text = function(parentEl) {
|
||||||
addToken(token, value);
|
addToken(token, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (this.showInvisibles) {
|
if (this.showInvisibles) {
|
||||||
if (lastRow !== this.session.getLength() - 1) {
|
if (lastRow !== this.session.getLength() - 1) {
|
||||||
|
|
@ -14326,16 +14332,16 @@ var Text = function(parentEl) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stringBuilder.push("</div>");
|
stringBuilder.push("</div>");
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$renderLine = function(stringBuilder, row, tokens) {
|
this.$renderLine = function(stringBuilder, row, tokens) {
|
||||||
// Check if the line to render is folded or not. If not, things are
|
// Check if the line to render is folded or not. If not, things are
|
||||||
// simple, otherwise, we need to fake some things...
|
// simple, otherwise, we need to fake some things...
|
||||||
if (!this.session.isRowFolded(row)) {
|
if (!this.session.isRowFolded(row)) {
|
||||||
var splits = this.session.getRowSplitData(row);
|
var splits = this.session.getRowSplitData(row);
|
||||||
this.$renderLineCore(stringBuilder, row, tokens, splits)
|
this.$renderLineCore(stringBuilder, row, tokens, splits);
|
||||||
} else {
|
} else {
|
||||||
this.$renderFoldLine(stringBuilder, row, tokens, splits);
|
this.$renderFoldLine(stringBuilder, row, tokens);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -14347,8 +14353,8 @@ var Text = function(parentEl) {
|
||||||
function addTokens(tokens, from, to) {
|
function addTokens(tokens, from, to) {
|
||||||
var idx = 0, col = 0;
|
var idx = 0, col = 0;
|
||||||
while ((col + tokens[idx].value.length) < from) {
|
while ((col + tokens[idx].value.length) < from) {
|
||||||
col += tokens[idx].value.length
|
col += tokens[idx].value.length;
|
||||||
idx++
|
idx++;
|
||||||
|
|
||||||
if (idx == tokens.length) {
|
if (idx == tokens.length) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -14367,7 +14373,7 @@ var Text = function(parentEl) {
|
||||||
});
|
});
|
||||||
|
|
||||||
col = from + value.length;
|
col = from + value.length;
|
||||||
idx += 1
|
idx += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (col < to) {
|
while (col < to) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue