mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 19:19:53 +00:00
Fix: nil error if the buffer file name doesn't contain directory.
This commit is contained in:
parent
87ee2e7122
commit
5fefd185b6
1 changed files with 1 additions and 1 deletions
|
@ -550,7 +550,7 @@ Show relative path to the project and truncate it.
|
|||
Example:
|
||||
~/Projects/FOSS/emacs/lisp/comint.el => emacs/l/comint.el"
|
||||
(let* ((project-root (doom-modeline-project-root))
|
||||
(relative-path (file-relative-name (file-name-directory file-path)
|
||||
(relative-path (file-relative-name (or (file-name-directory file-path) "./")
|
||||
(file-truename project-root))))
|
||||
(let ((active (doom-modeline--active))
|
||||
(modified-faces (if (buffer-modified-p) 'doom-modeline-buffer-modified)))
|
||||
|
|
Loading…
Reference in a new issue