fix: stty graceful failure, backend-size TYPE-ERROR safety net
- cl-tty stty calls now use :ignore-error-status t (works in PTY/piped env) - backend-size wraps in ignore-errors with 80x24 fallback in resize handler - Both fixes enable TUI to run in environments without full terminal capabilities
This commit is contained in:
@@ -852,7 +852,9 @@ Event handlers + daemon I/O + main loop.
|
||||
(cl-tty.input:read-event be :timeout 0)
|
||||
(cond
|
||||
((eq type :resize)
|
||||
(multiple-value-setq (w h) (cl-tty.backend:backend-size be))
|
||||
(multiple-value-setq (w h)
|
||||
(or (ignore-errors (cl-tty.backend:backend-size be))
|
||||
(values 80 24)))
|
||||
(setf prev-fb (cl-tty.rendering:make-framebuffer w h)
|
||||
curr-fb (cl-tty.rendering:make-framebuffer w h))
|
||||
(setf (getf *state* :dirty) (list t t t)))
|
||||
|
||||
Reference in New Issue
Block a user