Update modeline while refreshing vc.

This commit is contained in:
Vincent Zhang 2018-09-24 21:41:10 +08:00
parent c3b3f802e4
commit 299ef87829

View file

@ -693,6 +693,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-revert-hook #'doom-modeline--update-vcs)
(add-hook 'after-save-hook #'doom-modeline--update-vcs) (add-hook 'after-save-hook #'doom-modeline--update-vcs)
(add-hook 'find-file-hook #'doom-modeline--update-vcs t) (add-hook 'find-file-hook #'doom-modeline--update-vcs t)
(advice-add #'vc-refresh-state :after #'doom-modeline--update-vcs)
(doom-modeline-def-segment vcs (doom-modeline-def-segment vcs
"Displays the current branch, colored based on its state." "Displays the current branch, colored based on its state."