From a04d4a6352ded7ec2b84b548527e2458b919b21e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Jun 2017 11:51:36 +0200 Subject: [PATCH] Add buffer-file-name check to vcs segment #130 --- modules/ui/doom-modeline/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)