From 7eab3c93d224d9bc474bd41897d1f5fa51544f68 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Mon, 18 May 2026 15:16:58 -0400 Subject: [PATCH] =?UTF-8?q?v0.8.0:=20move=20position-cursor=20out=20of=20d?= =?UTF-8?q?irty-guarded=20redraw=20and=20out=20of=20dialog-guarded=20let?= =?UTF-8?q?=20=E2=80=94=20runs=20every=20frame=20unconditional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed (position-cursor fb w h) from inside redraw (which is gated by dirty flags), and from inside the dialog-guarded (unless dialog* ...) block in the main loop. Added unconditional (position-cursor be w h) at loop body level so it runs every single iteration regardless of dirty state or dialog activity. This ensures the cursor highlight always tracks cursor-pos correctly. --- org/channel-tui-main.org | 8 +++----- org/channel-tui-view.org | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/org/channel-tui-main.org b/org/channel-tui-main.org index e374d1f..9b5b001 100644 --- a/org/channel-tui-main.org +++ b/org/channel-tui-main.org @@ -1093,11 +1093,9 @@ Returns T on success, nil on failure. Does NOT wait or retry." (format nil "> ~a" (or filter "")) (theme-color :input-prompt) bg-p)) (cl-tty.backend:end-sync be)) - (sleep 0.1) - ;; Show terminal cursor at input position every frame - (unless cl-tty.dialog:*dialog-stack* - (passepartout.channel-tui:position-cursor be w h)))) - (progn (disconnect-daemon))))) + (sleep 0.1)) + (position-cursor be w h)) + (progn (disconnect-daemon))))) #+END_SRC * Test Suite diff --git a/org/channel-tui-view.org b/org/channel-tui-view.org index 97548c7..56adb83 100644 --- a/org/channel-tui-view.org +++ b/org/channel-tui-view.org @@ -339,7 +339,6 @@ and current sidebar mode (:auto/:visible/:hidden)." (when (sidebar-visible-p w) (view-sidebar fb w h)) (cl-tty.backend:end-sync fb) - (position-cursor fb w h) (setf (st :dirty) (list nil nil nil)))) (defun position-cursor (fb w h)