refactor(vc-gutter): remove redundant hooks

The refresh hooks address the stage/unstage cases already.
This commit is contained in:
Henrik Lissner 2022-08-09 14:57:36 +02:00
parent 15b00b78fe
commit e30eb03f83
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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. ;; UX: Update diff-hl when magit alters git state.
(when (featurep! :tools magit) (when (featurep! :tools magit)
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh) (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-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))
;; UX: Don't delete the current hunk's indicators while we're editing ;; UX: Don't delete the current hunk's indicators while we're editing
(add-hook! 'diff-hl-flydiff-mode-hook (add-hook! 'diff-hl-flydiff-mode-hook