branch: master
commit 182e35eebbc51601b1527d50de5f6e41a34700d8
Author: Diego A. Mundo <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Apply search highlighting for evil when applicable
    
    Seems I was a bit hasty in my last pull request, this minor change
    allows for highlighting the matches on swiper exist if
    `evil-ex-search-persistent-highlight` is set to `t`
    
    Use previously set variable name evil-ex-search-pattern
    
    Fixes #888
---
 swiper.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index 0946f02..7dc34fa 100644
--- a/swiper.el
+++ b/swiper.el
@@ -684,7 +684,9 @@ WND, when specified is the window."
         (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)))))))
+          (setq evil-ex-search-pattern (list re t t))
+          (when evil-ex-search-persistent-highlight
+            (evil-ex-search-activate-highlight evil-ex-search-pattern)))))))
 
 (defun swiper-from-isearch ()
   "Invoke `swiper' from isearch."

Reply via email to