Function: vertico-quick--read

vertico-quick--read is a byte-compiled function defined in vertico-quick.el.

Signature

(vertico-quick--read &optional FIRST)

Documentation

Read quick key given FIRST pressed key.

Source Code

;; Defined in ~/.emacs.d/elpa/vertico-20260821.1200/vertico-quick.el
(defun vertico-quick--read (&optional first)
  "Read quick key given FIRST pressed key."
  (cl-letf* ((list nil)
             (orig (symbol-function #'vertico--format-candidate))
             ((symbol-function #'vertico--format-candidate)
              (lambda (cand prefix suffix index start)
                (pcase-let ((`(,keys . ,events) (vertico-quick--keys first index start)))
                  (setq list (nconc events list))
                  (if (bound-and-true-p vertico-flat-mode)
                      (setq keys (string-replace " " "" keys)
                            cand (string-trim cand)
                            cand (substring cand (min (length cand) (length keys))))
                    (setq keys (concat keys (make-string (max 1 (- (length prefix) 2)) ?\s))))
                  (funcall orig cand keys suffix index start)))))
    (vertico--exhibit)
    (alist-get (read-key) list)))