fix(vertico): consult-recent-file previews

Turning on `recentf-mode` in a `cmd!` (introduced in 97048e2) means that
the `consult-customize` that turns off the previews doesn't work. This
is fixed by advising the function instead.
This commit is contained in:
Itai Y. Efrat 2021-07-31 10:47:00 +03:00
parent 859fc4e1b1
commit a23cb1fddf
2 changed files with 7 additions and 1 deletions

View file

@ -13,6 +13,12 @@ orderless."
(completion-styles +vertico-company-completion-styles))
(apply fn args)))
;;;###autoload
(defadvice! +vertico--consult-recent-file-a (&rest _args)
"`consult-recent-file' needs to have `recentf-mode' on to work correctly"
:before #'consult-recent-file
(recentf-mode +1))
;;;###autoload
(cl-defun +vertico-file-search (&key query in all-files (recursive t) prompt args)
"Conduct a file search using ripgrep.