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:
parent
c7abe743d1
commit
641cef9848
2 changed files with 10 additions and 1 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue