(defparameter *default-columns* 80)
(defparameter *default-lines* 24)
+(defparameter *highlight-color* :green
+ "Color to use for highlighting parentheses. NIL is the current foreground
+color bolded, other options are :BLACK, :RED, :GREEN, :YELLOW, :BLUE,
+:MAGENTA, :CYAN, and :WHITE.")
(defclass backend ()
((ready-p :accessor backend-ready-p :initform nil)
(error 'operation-error :component c :operation o)))
(defsystem :linedit
- :version "0.17.3"
+ :version "0.17.4"
:description "Readline-style library."
:licence "MIT"
:author "Nikodemus Siivola <nikodemus@sb-studio.net>"
(loop repeat up do (ti:tputs ti:cursor-up))
(ti:tputs ti:column-address col))
+(defun paren-style ()
+ (concat
+ (when *highlight-color*
+ (ti:tparm
+ ti:set-a-foreground
+ (or (position *highlight-color* '(:black :red :green :yellow :blue :magenta :cyan :white))
+ (error "Unknown color: ~S" *highlight-color*))))
+ ti:enter-bold-mode))
+
(defmethod display ((backend smart-terminal) &key prompt line point markup)
(let* (;; SBCL and CMUCL traditionally point *terminal-io* to /dev/tty,
;; and we do output on it assuming it goes to STDOUT. Binding
old-row 1))
(multiple-value-bind (marked-line markup)
(if markup
- (dwim-mark-parens line point
- :pre-mark ti:enter-bold-mode
+ (dwim-mark-parens line point
+ :pre-mark (paren-style)
:post-mark ti:exit-attribute-mode)
(values line point))
(let* ((full (concat prompt marked-line))