mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ui/doom-modeline: fix stringp errors
Caused by old uses of doom-project-root. See 53fe7a1
for details.
This commit is contained in:
@ -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)
|
(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."
|
"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)))
|
(active (active)))
|
||||||
(if (null root)
|
(if (null root)
|
||||||
(propertize "%b" 'face (if active 'doom-modeline-buffer-file))
|
(propertize "%b" 'face (if active 'doom-modeline-buffer-file))
|
||||||
@ -360,7 +360,7 @@ fish-shell style.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
~/Projects/FOSS/emacs/lisp/comint.el => ~/P/F/emacs/lisp/comint.el"
|
~/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-split (shrink-path-file-mixed project-root
|
||||||
(file-name-directory file-path)
|
(file-name-directory file-path)
|
||||||
file-path))
|
file-path))
|
||||||
|
Reference in New Issue
Block a user