Update git-gutter on magit stage/unstage file

Old magit-post-refresh-hook wasn't working (no guarantee the correct
buffer was current).
This commit is contained in:
Henrik Lissner 2018-07-12 18:47:36 +02:00
parent 9f50ca01a0
commit 76d90e752f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -48,8 +48,9 @@ to the right fringe.")
(ignore (git-gutter)))) (ignore (git-gutter))))
(add-hook 'doom-escape-hook #'+version-control|update-git-gutter t) (add-hook 'doom-escape-hook #'+version-control|update-git-gutter t)
;; update git-gutter when using these commands ;; update git-gutter when using magit commands
(add-hook 'magit-post-refresh-hook #'+version-control|update-git-gutter) (advice-add #'magit-stage-file :after #'+version-control|update-git-gutter)
(advice-add #'magit-unstage-file :after #'+version-control|update-git-gutter)
;; subtle diff indicators in the fringe ;; subtle diff indicators in the fringe
(when +vc-gutter-default-style (when +vc-gutter-default-style