diff --git a/org/channel-tui-view.org b/org/channel-tui-view.org index 9e1de0e..9324beb 100644 --- a/org/channel-tui-view.org +++ b/org/channel-tui-view.org @@ -165,8 +165,6 @@ Returns a list of strings, one per line." (push (list "│" bc (format nil "~a ~a ~,1fs" pfx name dur) bc) pairs) (dolist (l ol) (push (list "│" bc l bc) pairs))))))) - (when (< i (1- total)) - (push (list nil nil "" nil) pairs)) ;; spacer between messages (setf (aref msg-lines i) (nreverse pairs)) (setf (aref msg-heights i) (length pairs)))) (let ((msg-count 0) (lines-remaining max-lines)) @@ -182,14 +180,13 @@ Returns a list of strings, one per line." do (let ((pairs (aref msg-lines i))) (dolist (pair pairs) (when (>= y (- h 7)) (return)) - (destructuring-bind (bstr bcolor tstr tcolor &optional rect-bg) pair - (when rect-bg - (cl-tty.backend:draw-rect fb 0 y 1 1 :bg rect-bg)) - (let ((has-border (and bstr (> (length bstr) 0)))) - (when has-border - (cl-tty.backend:draw-text fb hpad y bstr bcolor nil)) - (when (and tstr (> (length tstr) 0)) - (cl-tty.backend:draw-text fb (+ hpad (if has-border 2 0)) y tstr tcolor nil)))) + (destructuring-bind (bstr bcolor tstr tcolor &optional rect-bg) pair + (when rect-bg + (cl-tty.backend:draw-rect fb 0 y 1 1 :bg rect-bg)) + (let ((has-border (and bstr (> (length bstr) 0)))) + (when has-border + (cl-tty.backend:draw-text fb hpad y bstr bcolor nil)) + (cl-tty.backend:draw-text fb (+ hpad (if has-border 2 0)) y tstr tcolor nil))) (incf y))))))))) #+END_SRC @@ -212,11 +209,11 @@ Returns a list of strings, one per line." (hint-fg (theme-color :hint))) ;; Light grey input panel: h-7 to h-4 (4 rows), indented by hpad (cl-tty.backend:draw-rect fb hpad (- h 7) inner-w 4 :bg bg-i) - ;; Speaker line for all 4 input rows (at hpad, matching history) + ;; Speaker line for all 4 input rows (dolist (r (list (- h 7) (- h 6) (- h 5) (- h 4))) - (cl-tty.backend:draw-text fb hpad r "│" (theme-color :input-prompt) nil)) + (cl-tty.backend:draw-text fb 0 r "│" (theme-color :input-prompt) nil)) ;; Prompt at h-6, second row at h-5 (placeholder for expansion) - (cl-tty.backend:draw-text fb (+ hpad 2) (- h 6) visible input-fg nil) + (cl-tty.backend:draw-text fb hpad (- h 6) visible input-fg nil) ;; Hint — lowercase, right-aligned at h-2 (let ((hint "ctrl+p | /help")) (cl-tty.backend:draw-text fb (- chat-w (length hint) 2) (- h 2) hint hint-fg (theme-color :bg))))) @@ -302,7 +299,7 @@ Returns a list of strings, one per line." (pos (or (st :cursor-pos) 0)) (prompt-w (- cw (* 2 hpad) 2)) (display-start (max 0 (- pos (1- prompt-w)))) - (cx (+ hpad 2 (- pos display-start))) + (cx (+ hpad (- pos display-start))) (cy (- h 6))) (cl-tty.backend:cursor-move fb cx cy) (cl-tty.backend:cursor-style fb :block :blink t)