Skip to content

Commit 2733f10

Browse files
committed
fix(font): Nerd-icons display on buffer, use for buffer function isntead
1 parent 5bde5a3 commit 2733f10

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

nerd-icons-buffer-menu.el

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,14 @@
7575
(format &optional face window buffer &rest _)
7676
(let ((original-value (funcall original-function format face window buffer)))
7777
(if (equal format mode-name)
78-
(let* ((major-mode (and buffer
79-
(with-current-buffer buffer major-mode)))
80-
(icon (let* ((icon (nerd-icons-icon-for-mode major-mode))
81-
(icon (if (or (null icon) (symbolp icon))
82-
(nerd-icons-faicon "nf-fa-file_o")
83-
icon)))
84-
(if (and icon
85-
(char-displayable-p (string-to-char icon)))
86-
(concat icon " ")
87-
""))))
78+
(let ((icon (let* ((icon (nerd-icons-icon-for-buffer))
79+
(icon (if (or (null icon) (symbolp icon))
80+
(nerd-icons-faicon "nf-fa-file_o")
81+
icon)))
82+
(if (and icon
83+
(char-displayable-p (string-to-char icon)))
84+
(concat icon " ")
85+
""))))
8886
(concat icon original-value))
8987
original-value))))
9088
(apply func args)))))

0 commit comments

Comments
 (0)