fix: add blocking-read-based CSI 18t terminal size query fallback

%query-terminal-size uses blocking read-char on an fd 0 stream
to read the terminal's response to \033[18t. This works even when
unix-simple-poll on fd 0 returns NIL (unlike read-char-no-hang).
Added as fallback in both modern and simple backends.
This commit is contained in:
2026-05-14 10:14:40 -04:00
parent 21d9890374
commit 5a3b882f93
3 changed files with 34 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ as a fallback when a keyword is not in *named-colors*.")
(values (sb-alien:deref winsize 1) ;; cols
(sb-alien:deref winsize 0))) ;; rows
(sb-alien:free-alien winsize))))
(%query-terminal-size)
(values 80 24)))
(defmethod backend-write ((b modern-backend) string)