diff --git a/lisp/channel-tui-main.lisp b/lisp/channel-tui-main.lisp index 739a00c..05ee26e 100644 --- a/lisp/channel-tui-main.lisp +++ b/lisp/channel-tui-main.lisp @@ -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))) diff --git a/org/channel-tui-main.org b/org/channel-tui-main.org index be1706a..165f38c 100644 --- a/org/channel-tui-main.org +++ b/org/channel-tui-main.org @@ -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)))