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

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

[elpa] externals/ivy-hydra 0eebf24 318/395: ivy.el (ivy--partial-cd-for-


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 0eebf24 318/395: ivy.el (ivy--partial-cd-for-single-directory): Fix for ignore-order
Date: Thu, 25 Feb 2021 08:32:29 -0500 (EST)

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

    ivy.el (ivy--partial-cd-for-single-directory): Fix for ignore-order
    
    Fixes #2599
---
 ivy-test.el | 22 ++++++++++++----------
 ivy.el      |  3 ++-
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ivy-test.el b/ivy-test.el
index ac1d250..f79504e 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1527,16 +1527,18 @@ a buffer visiting a file."
              "tests/find-file/directories-with-spaces/bar baz ii/file2"))))
 
 (ert-deftest counsel-find-file-single-match-directories ()
-  (should (string= (let ((ivy-extra-directories nil))
-                     (file-relative-name
-                      (ivy-with '(counsel-find-file) "a TAB TAB TAB"
-                                :dir 
"tests/find-file/single-match-directories/")))
-                   "tests/find-file/single-match-directories/a/file_in_a.txt"))
-  (should (string= (let ((ivy-extra-directories nil))
-                     (file-relative-name
-                      (ivy-with '(counsel-find-file) "b TAB TAB TAB"
-                                :dir 
"tests/find-file/single-match-directories/")))
-                   
"tests/find-file/single-match-directories/ba/file_in_ba.txt")))
+  (dolist (ivy-re-builders-alist '(((t . ivy--regex-plus))
+                                   ((t . ivy--regex-ignore-order))))
+    (should (string= (let ((ivy-extra-directories nil))
+                       (file-relative-name
+                        (ivy-with '(counsel-find-file) "a TAB TAB TAB"
+                                  :dir 
"tests/find-file/single-match-directories/")))
+                     
"tests/find-file/single-match-directories/a/file_in_a.txt"))
+    (should (string= (let ((ivy-extra-directories nil))
+                       (file-relative-name
+                        (ivy-with '(counsel-find-file) "b TAB TAB TAB"
+                                  :dir 
"tests/find-file/single-match-directories/")))
+                     
"tests/find-file/single-match-directories/ba/file_in_ba.txt"))))
 
 (ert-deftest counsel--split-string-with-eol-cr ()
   (should
diff --git a/ivy.el b/ivy.el
index 9a71429..21aa522 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1096,7 +1096,8 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
          (eq (ivy-state-collection ivy-last) #'read-file-name-internal)
          (= 1 (length
                (ivy--re-filter
-                (concat "^" (string-remove-prefix "^" ivy-regex))
+                (funcall ivy--regex-function
+                         (concat "^" (string-remove-prefix "^" ivy-text)))
                 ivy--all-candidates)))
          (let ((default-directory ivy--directory))
            (file-directory-p (ivy-state-current ivy-last))))



reply via email to

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