fix: clean TUI exit, restore terminal, suppress compiler warnings

passepartout script:
- Add (uiop:quit 0) after tui-main so SBCL exits on Ctrl+Q
- Remove exec to allow stty restore after sbcl subprocess
- Restore icanon echo ixon after TUI exits (terminal stuck raw)

channel-tui-view.org:
- Remove unused fb/h vars from test-sidebar-not-shown-narrow
- Add (declare (ignore w)) to render-styled
- Qualify theme-color as passepartout.channel-tui:theme-color
  (render-styled is in :passepartout package)
- Remove dead :url clause from pick in parse-markdown-spans
  (URLs handled by dedicated branch, not via pick)
- Update literate prose for all changes
This commit is contained in:
2026-05-14 16:25:36 -04:00
parent e453f9aad9
commit 6d7dd9e1ea
2 changed files with 34 additions and 14 deletions

View File

@@ -405,6 +405,7 @@ case "$COMMAND" in
(format t "Full backtrace saved to ~~/.cache/passepartout/tui-crash.log~%")
(sleep 3) (finish-output) (uiop:quit 1))))
(passepartout.channel-tui:tui-main))
(uiop:quit 0)
LISPEOF
# Capture terminal dimensions in non-standard env vars
# (SBCL strips COLUMNS/LINES but leaves MY_* alone).
@@ -415,7 +416,13 @@ LISPEOF
stty -icanon -echo -ixon 2>/dev/null
# 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
sbcl --noinform --load /tmp/tui-load.lisp
rc=$?
# Restore terminal cooked mode — stty was set to -icanon -echo -ixon
# before exec (or sbcl subprocess) to get character-at-a-time input.
# Without this restore the terminal stays raw after exit.
stty icanon echo ixon 2>/dev/null
exit $rc
;;
gateway)
SUBCMD=$1; PLATFORM=$2; TOKEN=$3