Skip to content

Commit

Permalink
fix: Fix overflow button for long lines with one token (#4818)
Browse files Browse the repository at this point in the history
  • Loading branch information
Exaphis committed Jun 3, 2022
1 parent 5c35ca8 commit 3f93451
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/ace/layer/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,15 +509,15 @@ var Text = function(parentEl) {

this.$renderSimpleLine = function(parent, tokens) {
var screenColumn = 0;
var token = tokens[0];
var value = token.value;
if (this.displayIndentGuides)
value = this.renderIndentGuide(parent, value);
if (value)
screenColumn = this.$renderToken(parent, screenColumn, token, value);
for (var i = 1; i < tokens.length; i++) {
token = tokens[i];
value = token.value;

for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
var value = token.value;
if (i == 0 && this.displayIndentGuides) {
value = this.renderIndentGuide(parent, value);
if (!value)
continue;
}
if (screenColumn + value.length > this.MAX_LINE_LENGTH)
return this.$renderOverflowMessage(parent, screenColumn, token, value);
screenColumn = this.$renderToken(parent, screenColumn, token, value);
Expand Down

0 comments on commit 3f93451

Please sign in to comment.