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
This commit is contained in:
@@ -976,17 +976,21 @@ Returns T on success, nil on failure. Does NOT wait or retry."
|
|||||||
(return))
|
(return))
|
||||||
(sleep 0.001))
|
(sleep 0.001))
|
||||||
(and b (char= b #\[)
|
(and b (char= b #\[)
|
||||||
(dotimes (_ 10)
|
(progn
|
||||||
(when (listen *standard-input*)
|
(dotimes (_ 15)
|
||||||
(setq t2 (read-char *standard-input* nil nil))
|
(when (listen *standard-input*)
|
||||||
(return))
|
(setq t2 (read-char *standard-input* nil nil))
|
||||||
(sleep 0.001))
|
(return))
|
||||||
|
(sleep 0.001))
|
||||||
|
t)
|
||||||
(case (and t2 (char-code t2))
|
(case (and t2 (char-code t2))
|
||||||
(65 :up) (66 :down)
|
(65 :up) (66 :down)
|
||||||
(67 :right) (68 :left)
|
(67 :right) (68 :left)
|
||||||
(72 :home) (70 :end)
|
(72 :home) (70 :end)
|
||||||
(otherwise :escape)))))))
|
(otherwise :escape)))))))
|
||||||
(when raw-ch
|
(when raw-ch
|
||||||
|
(when esc-seq
|
||||||
|
(add-msg :system (format nil "* CSI: ~s *" esc-seq)))
|
||||||
(queue-event
|
(queue-event
|
||||||
(list :type :key
|
(list :type :key
|
||||||
:payload (list :code code
|
:payload (list :code code
|
||||||
|
|||||||
Reference in New Issue
Block a user