mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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.
This commit is contained in:
@ -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))))
|
||||
|
Reference in New Issue
Block a user