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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new f0de83ad9e69 chore: show block cursor in TUI shell panel
f0de83ad9e69 is described below

commit f0de83ad9e69dc442a0106f436deadf3679f4ada
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 26 12:06:57 2026 +0200

    chore: show block cursor in TUI shell panel
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
index 6baaf2c841d5..d92c7af8c92b 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
@@ -255,6 +255,12 @@ class ShellPanel {
         }
         lastHistorySize = histSize;
 
+        // Show a block cursor by toggling the reversed attribute on the cell 
at the cursor position
+        if (scrollOffset == 0 && cursor[1] >= 0 && cursor[1] < innerHeight
+                && cursor[0] >= 0 && cursor[0] < innerWidth) {
+            screen[cursor[1] * innerWidth + cursor[0]] ^= (1L << 57);
+        }
+
         List<Line> lines;
         if (scrollOffset > 0) {
             lines = renderScrolledView(screen, innerWidth, innerHeight);

Reply via email to