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

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

[elpa] master 6951eba 001/272: Make ivy--regex-plus recognize ! at the b


From: Oleh Krehel
Subject: [elpa] master 6951eba 001/272: Make ivy--regex-plus recognize ! at the beginning of the str
Date: Mon, 25 Apr 2016 10:13:13 +0000

branch: master
commit 6951ebac786f32e16a57e7a09a08d47fc6a44304
Author: Samuel Loury <address@hidden>
Commit: Samuel Loury <address@hidden>

    Make ivy--regex-plus recognize ! at the beginning of the str
    
    When one types '!foo, he expects the candidates to be filtered out
    by 'foo'.
---
 ivy.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 5127582..4858f26 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1471,7 +1471,11 @@ match. Everything after \"!\" should not match."
       (0
        "")
       (1
-       (ivy--regex (car parts)))
+       (if (string-equal (substring str 0 1) "!")
+            (list
+             (cons "" t)
+             (list (ivy--regex (car parts))))
+           (ivy--regex (car parts))))
       (2
        (let ((res
               (mapcar #'list



reply via email to

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