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

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

[nongnu] elpa/helm a36fc9e2aa 1/2: Always put incomplete filenames on to


From: ELPA Syncer
Subject: [nongnu] elpa/helm a36fc9e2aa 1/2: Always put incomplete filenames on top
Date: Thu, 20 Oct 2022 07:59:06 -0400 (EDT)

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

    Always put incomplete filenames on top
---
 helm-files.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 4787084850..52465dce90 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -3882,14 +3882,14 @@ return FNAME with display property prefixed with [?]."
           (new-file (concat prefix-new " " fname)))))
 
 (defun helm-ff-score-candidate-for-pattern (real disp pattern)
-  (if (or (member real '("." ".."))
-          ;; Incomplete filenames are prefixed with two spaces, the
-          ;; first one beeing propertized with a 'display prop
-          ;; i.e. "[?] foo".
-          (and (string-match-p "\\`\\s-\\{2\\}" disp)
-               (string= real (substring-no-properties disp 2))))
-      900000
-      (helm-score-candidate-for-pattern real pattern)))
+  (cond ((member real '("." "..")) 900000)
+        ((and (string-match-p "\\`\\s-\\{2\\}" disp)
+               (string= real (substring-no-properties disp 2)))
+         ;; Incomplete filenames are prefixed with two spaces, the
+         ;; first one beeing propertized with a 'display prop
+         ;; i.e. "[?] foo".
+         900001)
+        (t (helm-score-candidate-for-pattern real pattern))))
 
 (defun helm-ff-sort-candidates-1 (candidates input)
   "Sort function for `helm-source-find-files'.



reply via email to

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