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:
2026-05-13 14:21:57 -04:00
parent 885fc3f92e
commit 4b60e8c544
2 changed files with 6 additions and 2 deletions

View File

@@ -809,7 +809,9 @@
(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)))