From 280da152807460f92cc57983a60d02a849c91805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 3 Nov 2019 23:04:06 +0100 Subject: [PATCH 1/2] Avoid nav-flash after each hydra action Hydra displays the hints in a buffer created by lv-window, which triggers nav-flash. By advicing lv-window, we can inhibit the nav-flash hook. --- modules/ui/hydra/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ui/hydra/config.el b/modules/ui/hydra/config.el index b8bfe3f79..ce36937cc 100644 --- a/modules/ui/hydra/config.el +++ b/modules/ui/hydra/config.el @@ -8,3 +8,9 @@ ;;;###package hydra (setq lv-use-separator t) + +(after! hydra + (defadvice! +hydra/inhibit-window-switch-hooks-a (orig-fn) + :around #'lv-window + (let ((doom-inhibit-switch-window-hooks t)) + (funcall orig-fn)))) From e0d9ef80e097965a17ec87708d288a6631acd979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Mon, 11 Nov 2019 22:02:45 +0100 Subject: [PATCH 2/2] Fix coding style --- modules/ui/hydra/config.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/ui/hydra/config.el b/modules/ui/hydra/config.el index ce36937cc..40a870fbe 100644 --- a/modules/ui/hydra/config.el +++ b/modules/ui/hydra/config.el @@ -9,8 +9,7 @@ ;;;###package hydra (setq lv-use-separator t) -(after! hydra - (defadvice! +hydra/inhibit-window-switch-hooks-a (orig-fn) - :around #'lv-window - (let ((doom-inhibit-switch-window-hooks t)) - (funcall orig-fn)))) +(defadvice! +hydra--inhibit-window-switch-hooks-a (orig-fn) + :around #'lv-window + (let ((doom-inhibit-switch-window-hooks t)) + (funcall orig-fn)))