[
https://issues.apache.org/jira/browse/GROOVY-12429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119008#comment-18119008
]
ASF GitHub Bot commented on GROOVY-12429:
-----------------------------------------
testlens-app[bot] commented on PR #2948:
URL: https://github.com/apache/groovy/pull/2948#issuecomment-5825939115
## ✅ All tests passed ✅
🏷️ Commit: 1cdf9f5e5e6f3e2d9a2533807ebfa4045d134e60
▶️ Tests: 120371 executed
⚪️ Checks: 32/32 completed
---
_Learn more about TestLens at
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
> GroovyConsole error link does not place the caret on the reported column
> ------------------------------------------------------------------------
>
> Key: GROOVY-12429
> URL: https://issues.apache.org/jira/browse/GROOVY-12429
> Project: Groovy
> Issue Type: Bug
> Reporter: Daniel Sun
> Priority: Major
>
> h2. Problem
> A compilation error in GroovyConsole prints a location such as {{line: 1,
> column: 9}}. Activating that link selects the whole line and leaves the caret
> after the last character. The status bar shows the end of the line, not the
> column named in the message, so the link does not show where the error is.
> On a later line the selection also starts at the newline that ends the
> previous line.
> h2. Steps to reproduce
> Run this script in GroovyConsole. The opening quote is not closed.
> {noformat}
> println '123
> {noformat}
> In the output pane, activate {{line: 1, column: 9}}.
> h2. Actual result
> The whole line is selected. The script is 12 characters long, the caret is
> left after the last character, and the status bar reads {{1:13}}.
> h2. Expected result
> The caret is on the opening quote, that character is selected, and the status
> bar reads {{1:9}}.
> When an error spans more than one character, the span is selected and the
> caret stays on the column named in the message. The status bar uses the same
> character columns as that message.
> h2. Other cases covered by the same defect
> * A location on a later line starts at the first character of that line.
> * A stack-trace link that names only a line still selects that whole line,
> from its first character. The status bar shows column 1 of that line.
> * A column past the end of the line stays on that line.
> * Activating the link from the keyboard moves the caret to the same place as
> a mouse click.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)