Skip to content

Commit

Permalink
Nano SyntaxHighlighter fails to highlight the line after the block c…
Browse files Browse the repository at this point in the history
…omment, fixes #743
  • Loading branch information
mattirn committed Nov 12, 2021
1 parent 4c4031d commit 9fb6229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtins/src/main/java/org/jline/builtins/Nano.java
Original file line number Diff line number Diff line change
Expand Up @@ -1574,10 +1574,10 @@ private AttributedStringBuilder _highlight(AttributedString line) {
AttributedStringBuilder a = new AttributedStringBuilder();
if (startEndHighlight && ruleStartId == i) {
if (end.find()) {
a.append(asb.columnSubSequence(0, end.end()), rule.getStyle());
a.append(asb.columnSubSequence(end.end(), asb.length()));
ruleStartId = 0;
startEndHighlight = false;
a.append(asb.columnSubSequence(0, end.end()), rule.getStyle());
a.append(_highlight(asb.columnSubSequence(end.end(), asb.length()).toAttributedString()));
} else {
a.append(asb, rule.getStyle());
done = true;
Expand Down

0 comments on commit 9fb6229

Please sign in to comment.