fix: nil guards on w and h in all view functions
Prevents crash when backend-size returns nil for height. Defaults to 80x24 if dimensions are nil or invalid.
This commit is contained in:
@@ -406,9 +406,12 @@ case "$COMMAND" in
|
||||
(sleep 3) (finish-output) (uiop:quit 1))))
|
||||
(passepartout.channel-tui:tui-main))
|
||||
LISPEOF
|
||||
# Export terminal dimensions — bash sets COLUMNS/LINES but
|
||||
# doesn't export them to subprocesses by default.
|
||||
export COLUMNS LINES
|
||||
# Set terminal dimensions from stty — bash's $COLUMNS/$LINES
|
||||
# are often missing or not exported. stty size always works.
|
||||
local ts=$(stty size 2>/dev/null)
|
||||
export COLUMNS="${ts#* }" LINES="${ts% *}"
|
||||
[ -z "$COLUMNS" ] && COLUMNS=80
|
||||
[ -z "$LINES" ] && LINES=24
|
||||
# Clear stale cl-tty cache to ensure latest backend-size fixes
|
||||
find ~/.cache/common-lisp -name "*.fasl" -path "*cl-tty*" -delete 2>/dev/null
|
||||
exec sbcl --noinform --load /tmp/tui-load.lisp
|
||||
|
||||
Reference in New Issue
Block a user