parent
a39ab0d607
commit
1c5fb5b75a
28 changed files with 835 additions and 883 deletions
|
|
@ -384,17 +384,10 @@ var Text = function(parentEl) {
|
|||
var screenColumn = 0;
|
||||
var self = this;
|
||||
|
||||
function addToken(token, value) {
|
||||
screenColumn = self.$renderToken(
|
||||
stringBuilder, screenColumn, token, value
|
||||
);
|
||||
}
|
||||
|
||||
if (!splits || splits.length == 0) {
|
||||
if (!splits || splits.length == 0)
|
||||
splitChars = Number.MAX_VALUE;
|
||||
} else {
|
||||
else
|
||||
splitChars = splits[0];
|
||||
}
|
||||
|
||||
if (!onlyContents) {
|
||||
stringBuilder.push("<div class='ace_line' style='height:",
|
||||
|
|
@ -408,11 +401,17 @@ var Text = function(parentEl) {
|
|||
var value = token.value;
|
||||
|
||||
if (chars + value.length < splitChars) {
|
||||
addToken(token, value);
|
||||
screenColumn = self.$renderToken(
|
||||
stringBuilder, screenColumn, token, value
|
||||
);
|
||||
chars += value.length;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
while (chars + value.length >= splitChars) {
|
||||
addToken(token, value.substring(0, splitChars - chars));
|
||||
screenColumn = self.$renderToken(
|
||||
stringBuilder, screenColumn,
|
||||
token, value.substring(0, splitChars - chars)
|
||||
);
|
||||
value = value.substring(splitChars - chars);
|
||||
chars = splitChars;
|
||||
|
||||
|
|
@ -430,17 +429,18 @@ var Text = function(parentEl) {
|
|||
}
|
||||
if (value.length != 0) {
|
||||
chars += value.length;
|
||||
addToken(token, value);
|
||||
screenColumn = self.$renderToken(
|
||||
stringBuilder, screenColumn, token, value
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.showInvisibles) {
|
||||
if (lastRow !== this.session.getLength() - 1) {
|
||||
if (lastRow !== this.session.getLength() - 1)
|
||||
stringBuilder.push("<span class='ace_invisible'>" + this.EOL_CHAR + "</span>");
|
||||
} else {
|
||||
else
|
||||
stringBuilder.push("<span class='ace_invisible'>" + this.EOF_CHAR + "</span>");
|
||||
}
|
||||
}
|
||||
stringBuilder.push("</div>");
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue