fix: nil check in CSI detection (= b2 91), Swank *standard-output* redirect
- (= b2 91) errors when b2 is nil (read-raw-byte timeout). Add (and b2 (= b2 91)) to guard against nil. - Swank writes ';; Swark started at port:...' to *standard-output*, not *error-output*. Bind *standard-output* to string stream too.
This commit is contained in:
@@ -886,10 +886,12 @@ Returns T on success, nil on failure. Does NOT wait or retry."
|
||||
(when (> swank-port 0)
|
||||
(handler-case
|
||||
(progn
|
||||
(ql:quickload :swank :silent t)
|
||||
(funcall (find-symbol "CREATE-SERVER" "SWANK")
|
||||
:port swank-port :dont-close t)
|
||||
(add-msg :system
|
||||
(ql:quickload :swank :silent t)
|
||||
(let ((*standard-output* (make-string-output-stream))
|
||||
(*error-output* (make-string-output-stream)))
|
||||
(funcall (find-symbol "CREATE-SERVER" "SWANK")
|
||||
:port swank-port :dont-close t))
|
||||
(add-msg :system
|
||||
(format nil "* Swank ~d M-x slime-connect *" swank-port)))
|
||||
(error ()
|
||||
(add-msg :system "* Swank unavailable *"))))
|
||||
@@ -969,7 +971,7 @@ Returns T on success, nil on failure. Does NOT wait or retry."
|
||||
(code b)
|
||||
(esc-seq (and (= code 27)
|
||||
(let ((b2 (cl-tty.input::read-raw-byte :timeout 0.15)))
|
||||
(when (= b2 91)
|
||||
(when (and b2 (= b2 91))
|
||||
(let ((t2 (cl-tty.input::read-raw-byte :timeout 0.15)))
|
||||
(and t2 (case t2
|
||||
(65 :up) (66 :down)
|
||||
|
||||
Reference in New Issue
Block a user