mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Don't update buffer info if the file doesn't exist.
This commit is contained in:
parent
c7251193bb
commit
c809e27487
1 changed files with 4 additions and 3 deletions
|
@ -618,9 +618,10 @@ buffer where knowing the current project directory is important."
|
|||
(when-let ((file-name (doom-modeline-buffer-file-name))
|
||||
(buffer-name (buffer-name))
|
||||
(buffer-file-name buffer-file-name))
|
||||
(if (string-equal
|
||||
(file-name-nondirectory buffer-file-name)
|
||||
(replace-regexp-in-string "<.+>$" "" buffer-name))
|
||||
(if (or (not (file-exists-p buffer-file-name))
|
||||
(string-equal
|
||||
(file-name-nondirectory buffer-file-name)
|
||||
(replace-regexp-in-string "<.+>$" "" buffer-name)))
|
||||
file-name
|
||||
(format "%s[%s]" file-name buffer-name))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue