Refresh vc when magit refreshes #826

Magit does not inform vc that changes have occurred to open buffers.
This fixes that (and indirectly fixes branch display in the modeline).
This commit is contained in:
Henrik Lissner 2018-08-23 17:09:37 +02:00
parent c7abe743d1
commit 641cef9848
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 1 deletions

View file

@ -529,6 +529,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(add-hook 'after-revert-hook #'+doom-modeline--update-vcs)
(add-hook 'after-save-hook #'+doom-modeline--update-vcs)
(add-hook 'find-file-hook #'+doom-modeline--update-vcs t)
(advice-add #'vc-refresh-state :after #'+doom-modeline--update-vcs)
(def-modeline-segment! vcs
"Displays the current branch, colored based on its state."