Skip to content

Commit

Permalink
init.el: swiper: Avoid delay when moving through results
Browse files Browse the repository at this point in the history
  • Loading branch information
mgalgs committed Nov 8, 2021
1 parent 2cb6ce6 commit 858df3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,15 @@ alteration."
:init
(use-package counsel)
(use-package swiper)
;; advice to prevent dynamic exhibit delay for C-n/C-p
;; https://github.com/abo-abo/swiper/issues/1218#issuecomment-962516670
(defvar +ivy--queue-last-input nil)
(defun +ivy-queue-exhibit-a(f &rest args)
(if (equal +ivy--queue-last-input (ivy--input))
(ivy--exhibit)
(apply f args))
(setq +ivy--queue-last-input (ivy--input)))
(advice-add 'ivy--queue-exhibit :around #'+ivy-queue-exhibit-a)
:config
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t))
Expand Down

0 comments on commit 858df3d

Please sign in to comment.