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

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

[nongnu] elpa/helm cbad7919e9 09/11: Be consistent with candidate-transf


From: ELPA Syncer
Subject: [nongnu] elpa/helm cbad7919e9 09/11: Be consistent with candidate-transformer in both in-buffer and async
Date: Thu, 14 Sep 2023 06:59:54 -0400 (EDT)

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

    Be consistent with candidate-transformer in both in-buffer and async
    
    When candidate-transformer is specified in source ALL candidates should
    be computed with the candidate-transformer function (in contrast with
    filtered-candidate-transformer).  This to be consistent with what sync
    sources do. The car of the cons is used for initial fetching of
    candidates whereas the cdr is used after when searching (in this case
    the candidate number limit is used).
---
 helm-core.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 910178872f..452dc0579a 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -6609,7 +6609,15 @@ To customize `helm-candidates-in-buffer' behaviour, use 
`search',
          #'buffer-substring-no-properties)
      (or (assoc-default 'search src)
          '(helm-candidates-in-buffer-search-default-fn))
-     (helm-candidate-number-limit src)
+     ;; When candidate-transformer is specified in source ALL candidates should
+     ;; be computed with the candidate-transformer function (in contrast with
+     ;; filtered-candidate-transformer).  This to be consistent with what sync
+     ;; sources do. The car of the cons is used for initial fetching of
+     ;; candidates whereas the cdr is used after when searching (in this case
+     ;; the candidate number limit is used).
+     (if (helm-get-attr 'candidate-transformer src)
+         (cons 99999999 (helm-candidate-number-limit src))
+       (helm-candidate-number-limit src))
      (helm-get-attr 'match-part)
      src)))
 
@@ -6631,9 +6639,10 @@ To customize `helm-candidates-in-buffer' behaviour, use 
`search',
         (goto-char start-point)
         (if (string= pattern "")
             (helm-initial-candidates-from-candidate-buffer
-             get-line-fn limit)
+             get-line-fn (if (consp limit) (car limit) limit))
           (helm-search-from-candidate-buffer
-           pattern get-line-fn search-fns limit
+           pattern get-line-fn search-fns
+           (if (consp limit) (cdr limit) limit)
            start-point match-part-fn source))))))
 
 



reply via email to

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