branch: master
commit 5f732cdce5ac2529f36b5c8cc9f053789783de45
Author: therockmandolinist <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Add compatibility with evil-ex-search.
    
    Fixes #887
---
 swiper.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index bd21928..0946f02 100644
--- a/swiper.el
+++ b/swiper.el
@@ -680,7 +680,11 @@ WND, when specified is the window."
         (add-to-history
          'regexp-search-ring
          re
-         regexp-search-ring-max)))))
+         regexp-search-ring-max)
+        (when (and (bound-and-true-p evil-mode)
+                   (eq evil-search-module 'evil-search))
+          (add-to-history 'evil-ex-search-history re)
+          (setq evil-ex-search-pattern (list re t t)))))))
 
 (defun swiper-from-isearch ()
   "Invoke `swiper' from isearch."

Reply via email to