branch: master
commit 89ed19e7014250a28f8f85af756f7ce4b9034d1c
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    ivy.el (ivy--regex-plus): Prettify a bit
    
    Fixes #344
---
 ivy.el |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/ivy.el b/ivy.el
index 30142d1..9e456ae 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1543,17 +1543,14 @@ match. Everything after \"!\" should not match."
       (0
        "")
       (1
-       (if (string-equal (substring str 0 1) "!")
-           (list
-            (cons "" t)
-            (list (ivy--regex (car parts))))
+       (if (string= (substring str 0 1) "!")
+           (list (cons "" t)
+                 (list (ivy--regex (car parts))))
          (ivy--regex (car parts))))
       (2
-       (let ((res
-              (mapcar #'list
-                      (split-string (cadr parts) " " t))))
-         (cons (cons (ivy--regex (car parts)) t)
-               res)))
+       (cons
+        (cons (ivy--regex (car parts)) t)
+        (mapcar #'list (split-string (cadr parts) " " t))))
       (t (error "Unexpected: use only one !")))))
 
 (defun ivy--regex-fuzzy (str)

Reply via email to