Skip to content

Commit

Permalink
swiper.el (swiper--action): A bit more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
abo-abo committed Feb 11, 2018
1 parent 02bdc7f commit b35ed50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions swiper.el
Original file line number Diff line number Diff line change
Expand Up @@ -759,16 +759,16 @@ the face, window and priority of the overlay."
'regexp-search-ring
re
regexp-search-ring-max)
(when (and (bound-and-true-p evil-mode)
(eq evil-search-module 'evil-search))
(when (bound-and-true-p evil-mode)
;; This allows evil mode to use swiper searches as defaults in
;; s-expressions
(setq isearch-string ivy-text)
(add-to-history 'evil-ex-search-history re)
(setq evil-ex-search-pattern (list re t t))
(setq evil-ex-search-direction 'forward)
(when evil-ex-search-persistent-highlight
(evil-ex-search-activate-highlight evil-ex-search-pattern)))))))
(when (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-direction 'forward)
(when evil-ex-search-persistent-highlight
(evil-ex-search-activate-highlight evil-ex-search-pattern))))))))

(defun swiper-from-isearch ()
"Invoke `swiper' from isearch."
Expand Down

0 comments on commit b35ed50

Please sign in to comment.