branch: elpa/helm commit 3de4f8bbd798b26e2f3182ab4b02611d11b2b65e Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Use specialized icons for dirs --- helm-files.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helm-files.el b/helm-files.el index 69e74c3983..3852d47ad3 100644 --- a/helm-files.el +++ b/helm-files.el @@ -4238,11 +4238,16 @@ If SKIP-BORING-CHECK is non nil don't filter boring files." (defun helm-ff-get-icon (disp file) "Get icon from all-the-icons for FILE. -Arg DISP is the display part of the candidate." +Arg DISP is the display part of the candidate. +Arg FILE is the real part of candidate, a filename with no props." (when helm-ff-icon-mode (let ((icon (helm-acond (;; Non symlink directories. (helm-ff--is-dir-from-disp disp) - (all-the-icons-octicon "file-directory")) + (helm-aif (all-the-icons-match-to-alist + (helm-basename file) + all-the-icons-dir-icon-alist) + (apply (car it) (cdr it)) + (all-the-icons-octicon "file-directory"))) (;; All files, symlinks may be symlink directories. (helm-ff--is-file-from-disp disp) ;; Detect symlink directories. We must call @@ -4252,12 +4257,7 @@ Arg DISP is the display part of the candidate." (if (and (memq it '(helm-ff-symlink helm-ff-dotted-symlink-directory)) (file-directory-p file)) - (let* ((icon (all-the-icons-match-to-alist - (helm-basename file) - all-the-icons-dir-icon-alist)) - (args (cdr icon))) - (apply #'all-the-icons-octicon - "file-symlink-directory" (cdr args))) + (all-the-icons-octicon "file-symlink-directory") (all-the-icons-icon-for-file file)))))) (when icon (concat icon " ")))))