From af88423b35ca715a79378239e445a1b3ffc6f8aa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 14 May 2017 09:48:12 +0200 Subject: [PATCH] ui/doom-modeline: fix symlinked buffer-path hijinks The modeline resolves a relative path to the current file in order to display a short path string in the modeline. However, symlinks would break this, resulting in paths like: ../../../../real/path/to/file. --- modules/ui/doom-modeline/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom-modeline/config.el b/modules/ui/doom-modeline/config.el index 66635d531..5e1f2a6d7 100644 --- a/modules/ui/doom-modeline/config.el +++ b/modules/ui/doom-modeline/config.el @@ -249,7 +249,7 @@ active." project root). Excludes the file basename. See `doom-buffer-name' for that." (when buffer-file-name (let ((buffer-path - (file-relative-name (file-name-directory buffer-file-name) + (file-relative-name (file-name-directory buffer-file-truename) (doom-project-root)))) (unless (equal buffer-path "./") (let ((max-length (truncate (* (window-body-width) 0.4))))