Add buffer-file-name check to vcs segment #130
This commit is contained in:
parent
f8dde296ca
commit
a04d4a6352
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
|
||||||
;;
|
;;
|
||||||
(def-modeline-segment! vcs
|
(def-modeline-segment! vcs
|
||||||
"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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue