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:
parent
125fca09a0
commit
af88423b35
1 changed files with 1 additions and 1 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue