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

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

[elpa] externals/ivy-hydra ace2475 260/395: counsel.el (counsel--sync-se


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra ace2475 260/395: counsel.el (counsel--sync-sentinel-on-exit): Fix regression
Date: Thu, 25 Feb 2021 08:32:15 -0500 (EST)

branch: externals/ivy-hydra
commit ace24753597403d038f1d5d093efa62192cac5c7
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel--sync-sentinel-on-exit): Fix regression
    
    Commit cfb395ef07a515e1e805547c29046dc24464f395 caused a regression in
    `counsel-grep', where `ivy-index-functions-alist' was not honored.
    
    Re #2477
---
 counsel.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/counsel.el b/counsel.el
index 4e33028..9121aa0 100644
--- a/counsel.el
+++ b/counsel.el
@@ -223,11 +223,14 @@ respectively."
                   (ivy-set-index 0)
                 (ivy--recompute-index re ivy--all-candidates))
             (ivy-set-index
-             (ivy--preselect-index
-              (if (> (length re) 0)
-                  cur
-                (ivy-state-preselect ivy-last))
-              ivy--all-candidates))))
+             (let ((func (ivy-alist-setting ivy-index-functions-alist)))
+               (if func
+                   (funcall func re ivy--all-candidates)
+                 (ivy--preselect-index
+                  (if (> (length re) 0)
+                      cur
+                    (ivy-state-preselect ivy-last))
+                  ivy--all-candidates))))))
         (setq ivy--old-cands ivy--all-candidates)
         (if ivy--all-candidates
             (ivy--exhibit)



reply via email to

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