diff --git a/org/channel-tui-main.org b/org/channel-tui-main.org index ea4f545..99710a5 100644 --- a/org/channel-tui-main.org +++ b/org/channel-tui-main.org @@ -967,7 +967,12 @@ Event handlers + daemon I/O + main loop. (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)) + (setq w (or (and (numberp w) (> w 0) w) 80) + h (or (and (numberp h) (> h 0) h) 24)) (setf (st :dirty) (list t t t)))) + ;; Guard w and h before render (resize or other code may have set them to nil) + (setq w (or (and (numberp w) (> w 0) w) 80) + h (or (and (numberp h) (> h 0) h) 24)) (when (or (first (st :dirty)) (second (st :dirty)) (third (st :dirty))) (cl-tty.backend:backend-clear be) (view-status be w h)