Skip to content

Commit

Permalink
Opt-out of Vertico in keyboard macros (See #478)
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed May 4, 2024
1 parent 1def56a commit b413071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions extensions/vertico-multiform.el
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ The keys in LIST can be symbols or regexps."
(push `(vertico--input . ,vertico-multiform-map) minor-mode-map-alist)))

(cl-defmethod vertico--advice (&context (vertico-multiform-mode (eql t)) &rest app)
(unwind-protect
(progn
(vertico-multiform--toggle -1)
(minibuffer-with-setup-hook #'vertico-multiform--setup
(apply app)))
(vertico-multiform--toggle 1)))
(if (or defining-kbd-macro executing-kbd-macro) (apply app)
(unwind-protect
(progn
(vertico-multiform--toggle -1)
(minibuffer-with-setup-hook #'vertico-multiform--setup (apply app)))
(vertico-multiform--toggle 1))))

(defun vertico-multiform--temporary-mode (mode arg)
"Enable or disable MODE temporarily in minibuffer given ARG.
Expand Down
3 changes: 2 additions & 1 deletion vertico.el
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and PRED."

(cl-defgeneric vertico--advice (&rest app)
"Advice for completion function, apply APP."
(minibuffer-with-setup-hook #'vertico--setup (apply app)))
(if (or defining-kbd-macro executing-kbd-macro) (apply app)
(minibuffer-with-setup-hook #'vertico--setup (apply app))))

(defun vertico-first ()
"Go to first candidate, or to the prompt when the first candidate is selected."
Expand Down

0 comments on commit b413071

Please sign in to comment.