diff --git a/modules/ui/doom-modeline/config.el b/modules/ui/doom-modeline/config.el index 5c50226b2..681e158a1 100644 --- a/modules/ui/doom-modeline/config.el +++ b/modules/ui/doom-modeline/config.el @@ -324,7 +324,7 @@ directory, the file name, and its state (modified, read-only or non-existent)." ;; (def-modeline-segment! vcs "Displays the current branch, colored based on its state." - (when vc-mode + (when (and vc-mode buffer-file-name) (let ((backend (vc-backend buffer-file-name)) (state (vc-state buffer-file-name)) (face 'mode-line-inactive)