Copy latest version of function from consult wiki

This commit is contained in:
David Morgan 2022-11-01 16:28:51 +00:00
parent c92918cf53
commit ccad661ab8
Signed by: djm
GPG Key ID: C171251002C200F2
1 changed files with 4 additions and 3 deletions

View File

@ -441,11 +441,12 @@ DEFS is a plist associating completion categories to commands."
:custom
(prefix-help-command 'embark-prefix-help-command)
:config
(defun embark-preview ()
(defun my-embark-preview ()
"Previews candidate in vertico buffer, unless it's a consult command"
(interactive)
(unless (bound-and-true-p consult--preview-function) ;; Disable preview for Consult commands
(unless (bound-and-true-p consult--preview-function)
(save-selected-window
(let ((embark-quit-after-action))
(let ((embark-quit-after-action nil))
(embark-dwim)))))
;; Hide the mode line of the Embark live/completions buffers