From cc38e67d7c12528fbe98fcbe8c137cd7d9cb35bd Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Fri, 15 May 2026 12:40:07 -0400 Subject: [PATCH] fix: Swank stderr leak, CSI detection with progn wrapper - Swank: bind *error-output* to string stream to prevent 'Swank started at port: 4006.' from leaking to terminal on exit - CSI detection: wrap inner dotimes in (progn ... t) so the and form doesn't short-circuit (dotimes returns nil, breaking the chain) - Add debug add-msg for CSI detection results --- org/channel-tui-main.org | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/org/channel-tui-main.org b/org/channel-tui-main.org index 6be2fae..ac5e2c3 100644 --- a/org/channel-tui-main.org +++ b/org/channel-tui-main.org @@ -976,17 +976,21 @@ Returns T on success, nil on failure. Does NOT wait or retry." (return)) (sleep 0.001)) (and b (char= b #\[) - (dotimes (_ 10) - (when (listen *standard-input*) - (setq t2 (read-char *standard-input* nil nil)) - (return)) - (sleep 0.001)) + (progn + (dotimes (_ 15) + (when (listen *standard-input*) + (setq t2 (read-char *standard-input* nil nil)) + (return)) + (sleep 0.001)) + t) (case (and t2 (char-code t2)) (65 :up) (66 :down) (67 :right) (68 :left) (72 :home) (70 :end) (otherwise :escape))))))) (when raw-ch + (when esc-seq + (add-msg :system (format nil "* CSI: ~s *" esc-seq))) (queue-event (list :type :key :payload (list :code code