v0.8.0: move position-cursor out of dirty-guarded redraw and out of dialog-guarded let — runs every frame unconditional

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.
This commit is contained in:
2026-05-18 15:16:58 -04:00
parent 2f1abee930
commit 7eab3c93d2
2 changed files with 3 additions and 6 deletions

View File

@@ -1093,11 +1093,9 @@ Returns T on success, nil on failure. Does NOT wait or retry."
(format nil "> ~a" (or filter "")) (format nil "> ~a" (or filter ""))
(theme-color :input-prompt) bg-p)) (theme-color :input-prompt) bg-p))
(cl-tty.backend:end-sync be)) (cl-tty.backend:end-sync be))
(sleep 0.1) (sleep 0.1))
;; Show terminal cursor at input position every frame (position-cursor be w h))
(unless cl-tty.dialog:*dialog-stack* (progn (disconnect-daemon)))))
(passepartout.channel-tui:position-cursor be w h))))
(progn (disconnect-daemon)))))
#+END_SRC #+END_SRC
* Test Suite * Test Suite

View File

@@ -339,7 +339,6 @@ and current sidebar mode (:auto/:visible/:hidden)."
(when (sidebar-visible-p w) (when (sidebar-visible-p w)
(view-sidebar fb w h)) (view-sidebar fb w h))
(cl-tty.backend:end-sync fb) (cl-tty.backend:end-sync fb)
(position-cursor fb w h)
(setf (st :dirty) (list nil nil nil)))) (setf (st :dirty) (list nil nil nil))))
(defun position-cursor (fb w h) (defun position-cursor (fb w h)