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

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

[nongnu] elpa/helm 1697afdfdc: Don't loop in highlight matches transform


From: ELPA Syncer
Subject: [nongnu] elpa/helm 1697afdfdc: Don't loop in highlight matches transformer when not needed
Date: Tue, 18 Oct 2022 08:59:12 -0400 (EDT)

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

    Don't loop in highlight matches transformer when not needed
---
 helm-core.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/helm-core.el b/helm-core.el
index 8279bfbc40..49190b7672 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -4651,7 +4651,8 @@ Highlight elements in CANDIDATE matching PATTERN according
 to the matching method in use.  When DIACRITICS is specified, ignore
 diacritics, see `char-fold-to-regexp' for more infos."
   (if (string= pattern "")
-      ;; Empty pattern, do nothing.
+      ;; Empty pattern, do nothing.  This is needed when this function
+      ;; is used outside of helm-fuzzy-highlight-matches like in 
*buffers-list. 
       candidate
     ;; Else start highlighting.
     (helm-fuzzy-default-highlight-match-1 candidate pattern diacritics 
file-comp)))
@@ -4669,6 +4670,7 @@ See `helm-fuzzy-default-highlight-match'."
            with pattern = (if file-comp-p
                               (file-name-nondirectory helm-input)
                             helm-input)
+           when (string= pattern "") return candidates
            for c in candidates
            collect (funcall helm-fuzzy-matching-highlight-fn c pattern diac 
file-comp-p)))
 



reply via email to

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