From fec53f7b1d4ac3744412a03f7c1263cbbbc28dad Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 23 Jul 2019 18:18:43 +0200 Subject: [PATCH] Fix git-gutter not updating when whole file is staged But we don't want it triggering on git-gutter:*-hunk, because they do their own refreshing work. --- modules/ui/vc-gutter/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index b222fbb26..3fe218cba 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -71,7 +71,9 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." (defun +vc-gutter-update-h (&rest _) "Refresh git-gutter on ESC. Return nil to prevent shadowing other `doom-escape-hook' hooks." - (when (and git-gutter-mode (not git-gutter:diffinfos)) + (when (and git-gutter-mode + (not (memq this-command '(git-gutter:stage-hunk + git-gutter:revert-hunk)))) (ignore (git-gutter))))) ;; update git-gutter when using magit commands (advice-add #'magit-stage-file :after #'+vc-gutter-update-h)