diff --git a/emacs/init.org b/emacs/init.org index e52d067..b86b8c5 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4608,7 +4608,7 @@ Or Gnus can read RSS feeds directly: (padding (or padding "\t"))) (format "%s%s%s%s%s" initial-padding chevron padding icon padding))) - (defun all-the-icons-dired--refresh () + (defun all-the-icons-dired-sidebar--refresh () "Display the icons of files in a dired buffer." (all-the-icons-dired--remove-all-overlays) (save-excursion @@ -4635,7 +4635,13 @@ Or Gnus can read RSS feeds directly: " \t") icon "\t"))))))) - (forward-line 1))))) + (forward-line 1)))) + + (advice-add 'all-the-icons-dired--refresh :around + (lambda (oldfn &rest args) + (if (eq major-mode 'dired-sidebar-mode) + (apply #'all-the-icons-dired-sidebar--refresh args) + (apply oldfn args))))) (add-to-list 'dired-sidebar-special-refresh-commands 'dired-kill-subdir) :custom