diff --git a/lisp/channel-tui-main.lisp b/lisp/channel-tui-main.lisp index 3760b00..93347a2 100644 --- a/lisp/channel-tui-main.lisp +++ b/lisp/channel-tui-main.lisp @@ -868,6 +868,9 @@ (let ((backend-type (if (typep be 'cl-tty.backend:modern-backend) "modern" "simple"))) (add-msg :system (format nil "* ~a backend ~dx~d *" backend-type w h))) + ;; Re-query terminal size before initial render (the first + ;; query may return 80x24 before the terminal settles) + (multiple-value-setq (w h) (cl-tty.backend:backend-size be)) ;; Initial render (cl-tty.backend:backend-clear be) (view-status be w h) @@ -884,7 +887,6 @@ (setf (st :connected) nil (st :busy) nil) (add-msg :system "* Connection lost — type /reconnect to retry *")))) - ;; Read key input via cl-tty read-event (10ms timeout) ;; Read key input via blocking read-char with 0.1s timeout ;; (sb-unix:unix-simple-poll returns NIL on fd 0 in this SBCL, ;; so read-char-no-hang and read-event never fire. Raw blocking