mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-14 15:46:56 -05:00
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:
@@ -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."
|
||||
|
Reference in New Issue
Block a user