Function: vertico-insert

vertico-insert is an interactive and byte-compiled function defined in vertico.el.

Signature

(vertico-insert)

Documentation

Insert current candidate in minibuffer.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/vertico-20260811.1003/vertico.el
(defun vertico-insert ()
  "Insert current candidate in minibuffer."
  (interactive)
  ;; XXX There is a small bug here, depending on interpretation. When completing
  ;; "~/emacs/master/li|/calc" where "|" is the cursor, then the returned
  ;; candidate only includes the prefix "~/emacs/master/lisp/", but not the
  ;; suffix "/calc". Default completion has the same problem when selecting in
  ;; the *Completions* buffer. See bug#48356.
  (when (> vertico--total 0)
    (let ((vertico--index (max 0 vertico--index)))
      (insert (prog1 (vertico--candidate) (delete-minibuffer-contents))))))