Skip to content

Commit

Permalink
Merge pull request #3559 from simonvonhackewitz/fix_3542_curly_underline
Browse files Browse the repository at this point in the history
util: fix error position at line end not underlined with ansi enabled
  • Loading branch information
michaellilltokiwa committed Aug 16, 2024
2 parents 9a23851 + 2241ea9 commit 644ba0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dev/flang/util/SourcePosition.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public String showInSource()
if (bytePos() == byteEndPos())
/* not a SourceRange! */
{
var underlined = _sourceFile.asString(p, Math.min(p+1, _sourceFile.byteLength()-1));
var underlined = _sourceFile.asString(p, Math.min(p+1, _sourceFile.lineEndPos(l)));
sb.append(_sourceFile.asString(_sourceFile.lineStartPos(l), p))
.append(Terminal.CURLY_UNDERLINE)
.append(Terminal.UNDERLINE_LINE_RED)
Expand Down

0 comments on commit 644ba0d

Please sign in to comment.