From 2fedbbcb3bbfec3a8dd559fc8d559bf252fec2e1 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sat, 16 May 2026 18:29:49 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20solid=20amber=20=E2=96=88=20cursor=20wit?= =?UTF-8?q?h=20finish-output=20flush?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced reverse-video cursor with a solid █ block in :input-prompt color (amber). Drawn at the insertion point every frame from redraw and main loop. finish-output ensures the cursor escape reaches the terminal immediately. --- org/channel-tui-view.org | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/org/channel-tui-view.org b/org/channel-tui-view.org index e68eeb7..3532ed6 100644 --- a/org/channel-tui-view.org +++ b/org/channel-tui-view.org @@ -320,8 +320,7 @@ Returns a list of strings, one per line." (setf (st :dirty) (list nil nil nil)))) (defun position-cursor (fb w h) - "Reverse-video cursor (Emacs style): shows the character at cursor position -with foreground and background colors swapped." + "Draw a solid block cursor █ at the input insertion point." (let* ((sw (if (sidebar-visible-p w) (or (st :sidebar-width) 42) 0)) (cw (- w sw)) (hpad 2) @@ -330,11 +329,9 @@ with foreground and background colors swapped." (prompt-w (- cw (* 2 hpad) 2)) (display-start (max 0 (- pos (1- prompt-w)))) (cx (+ hpad 2 (- pos display-start))) - (cy (- h 6)) - (ch (if (< pos (length text)) (char text pos) #\Space))) - (cl-tty.backend:draw-text fb cx cy (string ch) - (theme-color :bg) ;; fg = global bg (black) - (theme-color :input-fg)))) ;; bg = text color (reverse) + (cy (- h 6))) + (cl-tty.backend:draw-text fb cx cy "█" (theme-color :input-prompt) nil) + (finish-output (cl-tty.backend::backend-output-stream fb)))) #+END_SRC * Implementation — v0.7.0 additions