emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 354baf38b6 2/4: Fix predicates used by helm-ff-icon-m


From: ELPA Syncer
Subject: [nongnu] elpa/helm 354baf38b6 2/4: Fix predicates used by helm-ff-icon-mode for directory and files
Date: Tue, 18 Oct 2022 00:58:52 -0400 (EDT)

branch: elpa/helm
commit 354baf38b66b8fbf21f1ca1d22ff116c2fb68341
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Fix predicates used by helm-ff-icon-mode for directory and files
    
    This ensure matching the underlying faces when current face is hidden
    by match higlighting (not already enabled but now ready).
    
    Bind minibuffer-completing-file-name in HFF so that highlight match fn
    be aware we are completing files (only basename is used then).
---
 helm-files.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 1f2279d383..d571c2af42 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -4141,12 +4141,13 @@ Arg DISP is the display part of the candidate."
 
 (defun helm-ff--is-dir-from-disp (disp)
   "Return the face used for candidate when candidate is a directory."
-  (cl-loop for face in '(helm-ff-directory helm-ff-dotted-directory)
-           thereis (text-property-any 0 (length disp) 'face face disp)))
+  (cl-loop with faces = (helm-mklist (get-text-property 2 'face disp))
+           for face in '(helm-ff-directory helm-ff-dotted-directory)
+           thereis (memq face faces)))
 
 (defun helm-ff--is-file-from-disp (disp)
   "Return the face used for file's candidate or dotted-symlink dirs."
-  (cl-loop with len = (length disp)
+  (cl-loop with faces = (helm-mklist (get-text-property 2 'face disp))
            for face in '(helm-ff-file
                          helm-ff-suid
                          helm-ff-executable
@@ -4155,7 +4156,7 @@ Arg DISP is the display part of the candidate."
                          helm-ff-symlink
                          helm-ff-dotted-symlink-directory
                          helm-ff-backup-file)
-           when (text-property-any 0 len 'face face disp)
+           when (memq face faces)
            return face))
 
 ;;;###autoload
@@ -5248,7 +5249,8 @@ Use it for non-interactive calls of `helm-find-files'."
                            (expand-file-name tap))))
          ;; Ensure not being prompted for password each time we
          ;; navigate to a directory.
-         (password-cache t))
+         (password-cache t)
+         (minibuffer-completing-file-name t))
     (helm-set-local-variable 'helm-follow-mode-persistent nil
                              'helm-drag-mouse-1-fn 'helm-ff-drag-mouse-1-fn)
     (unless helm-source-find-files



reply via email to

[Prev in Thread] Current Thread [Next in Thread]