Remove redundant slash \ in truncated directory.

This commit is contained in:
Vincent Zhang 2018-11-20 21:26:34 +08:00
parent a530aaee04
commit 669206d03a

View file

@ -559,11 +559,12 @@ Example:
(let ((project-props `(,@(if project-faces `(:inherit ,project-faces)) ,@(if active '(:weight bold)))) (let ((project-props `(,@(if project-faces `(:inherit ,project-faces)) ,@(if active '(:weight bold))))
(relative-props `(,@(if relative-faces `(:inherit ,relative-faces)))) (relative-props `(,@(if relative-faces `(:inherit ,relative-faces))))
(file-props `(,@(if file-faces `(:inherit ,file-faces))))) (file-props `(,@(if file-faces `(:inherit ,file-faces)))))
(concat (propertize (concat (propertize (file-name-nondirectory (directory-file-name (doom-modeline-project-root)))
(concat (file-name-nondirectory (directory-file-name (doom-modeline-project-root))) "/") 'face project-props)
'face project-props) (propertize (if (string-equal relative-path "./")
(unless (string-equal relative-path "./") "/"
(propertize (shrink-path--dirs-internal relative-path t) 'face relative-props)) (shrink-path--dirs-internal relative-path t))
'face relative-props)
(propertize (file-name-nondirectory file-path) 'face file-props))))))) (propertize (file-name-nondirectory file-path) 'face file-props)))))))
(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)