From e30eb03f8309d9fd4ab9011addd442bb00c3843b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 9 Aug 2022 14:57:36 +0200 Subject: [PATCH] refactor(vc-gutter): remove redundant hooks The refresh hooks address the stage/unstage cases already. --- modules/ui/vc-gutter/config.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index 3db16217e..29fa16814 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -183,9 +183,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." ;; UX: Update diff-hl when magit alters git state. (when (featurep! :tools magit) (add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh) - (add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh) - (add-hook 'magit-post-stage-hook #'+vc-gutter-update-h) - (add-hook 'magit-post-unstage-hook #'+vc-gutter-update-h)) + (add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh)) ;; UX: Don't delete the current hunk's indicators while we're editing (add-hook! 'diff-hl-flydiff-mode-hook