tools/nav-flash: refactor & reduce false positive jumps

This commit is contained in:
Henrik Lissner 2018-03-26 06:41:33 -04:00
parent b47ccab4a5
commit 3b94bafb3a
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -3,18 +3,18 @@
(def-package! nav-flash
:commands nav-flash-show
:init
;; NOTE In :feature jump `recenter' is hooked to a bunch of jumping commands,
;; which will trigger nav-flash.
(add-hook 'doom-after-switch-window-hook #'+nav-flash/blink-cursor)
(advice-add #'recenter :around #'+nav-flash*blink-cursor-maybe)
;; NOTE In :feature lookup `recenter' is hooked to a bunch of jumping
;; commands, which will trigger nav-flash.
(add-hook!
'(doom-after-switch-window-hook
imenu-after-jump-hook evil-jumps-post-jump-hook
counsel-grep-post-action-hook dumb-jump-after-jump-hook)
#'+nav-flash/blink-cursor)
(advice-add #'save-place-find-file-hook :after #'+nav-flash/blink-cursor)
(after! evil
(advice-add #'evil--jumps-jump :after #'+nav-flash/blink-cursor)
(advice-add #'evil-window-top :after #'+nav-flash/blink-cursor)
(advice-add #'evil-window-middle :after #'+nav-flash/blink-cursor)
(advice-add #'evil-window-bottom :after #'+nav-flash/blink-cursor)))