branch: externals/ivy
commit 9dafc4a810fda6d33c356f7105c313a374b2cb32
Merge: 16487e9946 738da36d1b
Author: Basil L. Contovounesios <ba...@contovou.net>
Commit: Basil L. Contovounesios <ba...@contovou.net>

    Merge branch 'master' into externals/ivy
---
 .mailmap |  1 +
 ivy.el   | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/.mailmap b/.mailmap
index 1a00c174ba..fa38b3f201 100644
--- a/.mailmap
+++ b/.mailmap
@@ -18,6 +18,7 @@
 <ricouillet...@gmail.com> <ad...@ericdanan.net>
 <ricouillet...@gmail.com> <eric.da...@u-cergy.fr>
 <syo...@gmail.com> <shohei.yosh...@dena.com>
+<ywwr...@gmail.com> <58066925+ywwr...@users.noreply.github.com>
 Daanturo <daant...@gmail.com> <dantle....@gmail.com>
 Diego A. Mundo <diegoamu...@gmail.com>
 Earl Hyatt <oka...@protonmail.com> <ej...@protonmail.com>
diff --git a/ivy.el b/ivy.el
index db41371913..446f57e77d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3604,8 +3604,8 @@ In any Ivy completion session, the case folding starts 
with
 RE is a list of cons cells, with a regexp car and a boolean cdr.
 When the cdr is t, the car must match.
 Otherwise, the car must not match."
-  (if (equal re "")
-      candidates
+  (unless (member re '("" ()))
+    (setq candidates (copy-sequence candidates))
     (ignore-errors
       (dolist (re (if (stringp re) (list (cons re t)) re))
         (let* ((re-str (car re))
@@ -3614,10 +3614,10 @@ Otherwise, the car must not match."
                     (funcall mkpred re-str)
                   (lambda (x) (string-match-p re-str x)))))
           (setq candidates
-                (cl-remove nil candidates
+                (cl-delete nil candidates
                            (if (cdr re) :if-not :if)
-                           pred))))
-      candidates)))
+                           pred))))))
+  candidates)
 
 (defun ivy--filter (name candidates)
   "Return all items that match NAME in CANDIDATES.

Reply via email to