diff options
author | David Morgan <djm_uk@protonmail.com> | 2024-09-26 13:19:28 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2024-09-26 13:19:28 +0100 |
commit | 9c8cd626151246d1245e7f5c6d89afcf4f4a476c (patch) | |
tree | 3818c09cf68ea65214e5f13e074938f66418055a /.emacs.d/lisp/init-minibuffer.el | |
parent | 7b99d8c7768bac8731dcb979499d75cfbf473445 (diff) | |
download | dotfiles-9c8cd626151246d1245e7f5c6d89afcf4f4a476c.tar.gz |
Indicate when vertico wraps round
Diffstat (limited to '.emacs.d/lisp/init-minibuffer.el')
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index 46f5af6..eec2a28 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -17,6 +17,15 @@ (setq enable-recursive-minibuffers t) (minibuffer-depth-indicate-mode t) + ;; https://github.com/minad/vertico/wiki#ding-when-wrapping-around + (advice-add #'vertico-next + :around + #'(lambda (origin &rest args) + (let ((beg-index vertico--index)) + (apply origin args) + (if (not (eq 1 (abs (- beg-index vertico--index)))) + (ding))))) + ;; Add prompt indicator to `completing-read-multiple'. ;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. (defun crm-indicator (args) |