fix: TUI crash on keypress — config inner cond extra paren
Root cause: config inner cond had )))) (4 closes) but needed ))) (3). The 4th ) prematurely closed the outer cond config clause, making (t (cond ...)) a bare function call to T instead of the cond default. Also fixed chat-render coordinate bug (:y 1 :x y -> :y y :x 1) Added backtrace diag (handler-bind all errors, sb-debug to stderr) Added asdf central-registry push + :force t for stale-cache prevention
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
(:export :tui-main))
|
||||
(in-package :passepartout.gateway-tui)
|
||||
|
||||
(declaim (optimize (debug 3) (safety 3) (speed 0)))
|
||||
|
||||
(defvar *stream* nil "TCP stream to daemon")
|
||||
(defvar *input-buffer* nil "Current input line as reversed char list")
|
||||
(defvar *input-history* nil "Sent messages (newest first)")
|
||||
@@ -126,8 +128,8 @@
|
||||
(text (cdr entry))
|
||||
(prefix (if (eq dir :sent) "⬆" "⬇"))
|
||||
(label (format nil "~a [~a] ~a" prefix (timestamp) text)))
|
||||
(add-string win label :y 1 :x y)
|
||||
(incf y))))))
|
||||
(add-string win label :y y :x 1)
|
||||
(incf y))))))
|
||||
(refresh win))
|
||||
|
||||
(defun input-render (win)
|
||||
@@ -318,12 +320,12 @@
|
||||
(config-render-cascade config-win))
|
||||
((eql ch #\3)
|
||||
(config-render-models config-win))
|
||||
((eql ch #\4)
|
||||
(config-render-view config-win))))
|
||||
(status-render status-win))
|
||||
;; Chat mode key handling
|
||||
(t
|
||||
(cond
|
||||
((eql ch #\4)
|
||||
(config-render-view config-win)))
|
||||
(status-render status-win))
|
||||
;; Chat mode key handling
|
||||
(t
|
||||
(cond
|
||||
;; Enter/Return submit
|
||||
((or (eql ch 10) (eql ch 13) (eq ch :enter) (eql ch #\Newline) (eql ch #\Return))
|
||||
(setf *chat-scroll-pos* 0)
|
||||
@@ -367,7 +369,7 @@
|
||||
(let ((converted (code-char ch)))
|
||||
(when (and converted (graphic-char-p converted))
|
||||
(push converted *input-buffer*)
|
||||
(input-render input-win))))))))
|
||||
(input-render input-win)))))))))
|
||||
(refresh scr)
|
||||
(sleep 0.01))
|
||||
(disconnect-daemon))))
|
||||
|
||||
Reference in New Issue
Block a user