ui/doom-modeline: fix stringp errors

Caused by old uses of doom-project-root. See 53fe7a1 for details.
This commit is contained in:
Henrik Lissner 2018-09-29 21:58:09 -04:00
parent fd19698927
commit 6c5512896a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -339,7 +339,7 @@ If TRUNCATE-TAIL is t also truncate the parent directory of the file."
(defun +doom-modeline--buffer-file-name-relative (_file-path true-file-path &optional include-project)
"Propertized `buffer-file-name' showing directories relative to project's root only."
(let ((root (doom-project-root))
(let ((root (or (doom-project-root) default-directory))
(active (active)))
(if (null root)
(propertize "%b" 'face (if active 'doom-modeline-buffer-file))
@ -360,7 +360,7 @@ fish-shell style.
Example:
~/Projects/FOSS/emacs/lisp/comint.el => ~/P/F/emacs/lisp/comint.el"
(let* ((project-root (doom-project-root))
(let* ((project-root (or (doom-project-root) default-directory))
(file-name-split (shrink-path-file-mixed project-root
(file-name-directory file-path)
file-path))