Closed jacobilsoe closed 3 years ago
(defun all-the-icons-dired--refresh ()
"Display the icons of files in a dired buffer."
(all-the-icons-dired--remove-all-overlays)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(when (dired-move-to-filename nil)
(let ((case-fold-search t))
(when-let* ((file (dired-get-filename 'relative 'noerror))
(icon (if (file-directory-p file)
(all-the-icons-icon-for-dir file
:face 'all-the-icons-dired-dir-face
:v-adjust all-the-icons-dired-v-adjust)
(apply 'all-the-icons-icon-for-file file
(append
`(:v-adjust ,all-the-icons-dired-v-adjust)
(when all-the-icons-dired-monochrome
`(:face ,(face-at-point))))))))
(if (member file '("." ".."))
(all-the-icons-dired--add-overlay (point) " \t")
(all-the-icons-dired--add-overlay (point) (concat icon "\t"))))))
(forward-line 1))))
Does this work for you?
Nope, same behaviour.
Sorry case-fold-search
should be set to t
. Try that.
Yes, I actually just tried it before you wrote. :smile: It works setting it to t.
It seems filename matching is case sensitive when using all-the-icons-dired.
a.pdf shows a PDF icon whereas a.PDF shows the default icon.
If I just call all-the-icons-icon-for-file manually it returns the PDF icon for both a.pdf and a.PDF.