Function: vertico-repeat--restore

vertico-repeat--restore is a byte-compiled function defined in vertico-repeat.el.

Signature

(vertico-repeat--restore SESSION)

Documentation

Restore Vertico SESSION for vertico-repeat.

Source Code

;; Defined in ~/.emacs.d/elpa/vertico-20260913.1525/vertico-repeat.el
(defun vertico-repeat--restore (session)
  "Restore Vertico SESSION for `vertico-repeat'."
  (delete-minibuffer-contents)
  (insert (cadr session))
  (setq vertico--lock-candidate
        (when-let* ((cand (seq-find #'stringp (cddr session))))
          (vertico--update)
          (when-let* ((idx (seq-position vertico--candidates cand)))
            (setq vertico--index idx)
            t)))
  ;; Restore display modes if not modifying the current session
  (when-let* (((not (and vertico-repeat--command
                         (eq vertico-repeat--command (car session)))))
              (mode (seq-find #'symbolp (cddr session)))
              ((bound-and-true-p vertico-multiform-mode))
              ((not (and (boundp mode) (symbol-value mode)))))
    (declare-function vertico-multiform--toggle-mode "ext:vertico-multiform")
    (vertico-multiform--toggle-mode mode))
  (vertico--exhibit))