Fix: invalid shrinked file path when the file is not in a project.

Refer to
https://emacs-china.org/t/doom-modeline-doom-emacs-mode-line/6742/34?u=seagle0128.
This commit is contained in:
Vincent Zhang 2018-09-24 22:38:01 +08:00
parent 299ef87829
commit a22a895b7b

View file

@ -525,7 +525,7 @@ fish-shell style.
Example:
~/Projects/FOSS/emacs/lisp/comint.el => ~/P/F/emacs/lisp/comint.el"
(let* ((project-root (doom-modeline-project-root))
(file-name-split (shrink-path-file-mixed project-root
(file-name-split (shrink-path-file-mixed (or project-root "")
(file-name-directory buffer-file-name)
buffer-file-name))
(active (doom-modeline--active)))