You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/03/03 04:42:50 UTC

[groovy] branch GROOVY_3_0_X updated: groovyConsole: show line numbers when launched with a filename (closes #1181)

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

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


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 9d7dd80  groovyConsole: show line numbers when launched with a filename (closes #1181)
9d7dd80 is described below

commit 9d7dd8094470b91644b025ac4161b347879ec564
Author: Mikko Värri <vm...@linuxbox.fi>
AuthorDate: Mon Mar 2 20:40:41 2020 +0200

    groovyConsole: show line numbers when launched with a filename (closes #1181)
    
    When using the `groovyConsole filename` invocation format,
    only the first line was numbered.
---
 .../groovy-console/src/main/groovy/groovy/console/ui/Console.groovy   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
index 215f0a1..0ce2c43 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
@@ -858,6 +858,10 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
                 // GROOVY-3684: focus away and then back to inputArea ensures caret blinks
                 swing.doLater outputArea.&requestFocusInWindow
                 swing.doLater inputArea.&requestFocusInWindow
+                // Line numbers are typically (re)drawn using a document listener,
+                // but those were disabled above while modifying the document.
+                // So make sure line numbers are drawn now.
+                inputEditor.repaint()
             }
         }
     }