fix: add SIGWINCH resize handling for /dev/tty input path
Main loop now checks cl-tty.input::*terminal-resized-p* on every iteration. When set (by SIGWINCH handler), re-queries backend-size and marks all regions dirty for re-render.
This commit is contained in:
@@ -925,6 +925,12 @@ Event handlers + daemon I/O + main loop.
|
||||
(setf (st :connected) nil
|
||||
(st :busy) nil)
|
||||
(add-msg :system "* Connection lost — type /reconnect to retry *"))))
|
||||
;; Check for terminal resize (SIGWINCH sets this flag)
|
||||
(when (boundp 'cl-tty.input::*terminal-resized-p*)
|
||||
(when cl-tty.input::*terminal-resized-p*
|
||||
(setf cl-tty.input::*terminal-resized-p* nil)
|
||||
(multiple-value-setq (w h) (cl-tty.backend:backend-size be))
|
||||
(setf (st :dirty) (list t t t))))
|
||||
;; Read key input from /dev/tty (non-blocking)
|
||||
(let ((raw-ch (read-char-no-hang tty nil nil)))
|
||||
(when raw-ch
|
||||
|
||||
Reference in New Issue
Block a user