modeline: add buffer-file-name check to *vc segment

This commit is contained in:
Henrik Lissner 2017-01-07 02:53:02 -05:00
parent 4f482c099f
commit 1309f6baff

View file

@ -238,7 +238,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(defun *vc () (defun *vc ()
"Displays the current branch, colored based on its state." "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)) (let ((backend (vc-backend buffer-file-name))
(state (vc-state buffer-file-name)) (state (vc-state buffer-file-name))
(face 'mode-line-inactive) (face 'mode-line-inactive)