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

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

[elpa] externals/ivy-hydra baac6e1 090/395: swiper.el (swiper--re-builde


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra baac6e1 090/395: swiper.el (swiper--re-builder): Fix "^$" for swiper
Date: Thu, 25 Feb 2021 08:31:38 -0500 (EST)

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

    swiper.el (swiper--re-builder): Fix "^$" for swiper
    
    The candidates have " " prepended to them to hold text properties.
    So "^$" should be translated to "^ $".
    
    Fixes #2395
---
 swiper.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index 426dce9..9828ddc 100644
--- a/swiper.el
+++ b/swiper.el
@@ -745,7 +745,9 @@ line numbers.  For the buffer, use `ivy--regex' instead."
                              re)))
                   (cond
                     ((string= re "$")
-                     "^$")
+                     (if (eq (ivy-state-caller ivy-last) 'swiper)
+                         "^ $"
+                       "^$"))
                     ((zerop ivy--subexps)
                      (prog1 (format "^ ?\\(%s\\)" re)
                        (setq ivy--subexps 1)))



reply via email to

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