about summary refs log tree commit diff stats
path: root/lisp/+vertico.el
blob: 4adde3d870256732112805fed1710a318766a9e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; +vertico.el -*- lexical-binding: t; -*-

;;; Code:

;; https://old.reddit.com/r/emacs/comments/rbmfwk/weekly_tips_tricks_c_thread/hof7rz7/
;; Add this advice to `vertico-next'.
;; Takes care of `vertico-previous' as well, since it calls `vertico-next'.
(defun +vertico-ding-wrap (origin &rest args)
  "ADVICE to wrap `vertico-next': ding when wrapping."
  (let ((beg-index vertico--index))
    (apply origin args)
    (unless (eq 1 (abs (- beg-index vertico--index)))
      (ding))))

(provide '+vertico)
;;; +vertico.el ends here