This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 444a20712c GROOVY-11690: Slightly expanded error messages
444a20712c is described below

commit 444a20712c01db823431d51c0abf345feb67c663
Author: Paul King <[email protected]>
AuthorDate: Mon Jun 2 20:32:33 2025 +1000

    GROOVY-11690: Slightly expanded error messages
---
 src/main/java/org/codehaus/groovy/control/SourceUnit.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/control/SourceUnit.java 
b/src/main/java/org/codehaus/groovy/control/SourceUnit.java
index d7a577ab2e..adf42345d4 100644
--- a/src/main/java/org/codehaus/groovy/control/SourceUnit.java
+++ b/src/main/java/org/codehaus/groovy/control/SourceUnit.java
@@ -281,10 +281,10 @@ public class SourceUnit extends ProcessingUnit {
             if (column > 0) {
                 String marker = Utilities.repeatString(" ", column - 1) + "^";
 
-                if (column > 40) {
-                    int start = column - 30 - 1;
+                if (column > 60) {
+                    int start = column - 45 - 1;
                     int length = text.length();
-                    int end = (column + 10 > length ? length : column + 10 - 
1);
+                    int end = (column + 25 > length ? length : column + 25 - 
1);
                     if (start >= length || end < start)
                         return null; // can happen with CR only files 
GROOVY-10676
                     sample = "   " + text.substring(start, end) + 
Utilities.eol() + "   " + marker.substring(start);

Reply via email to