branch: master
commit e072e96be298f9d097580f14589e91eaef8992f8
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper-history): New defvar
* swiper.el (swiper--ivy): Use `swiper-history'.
Allows to get more use of "M-p", "M-n" and "C-r".
---
swiper.el | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/swiper.el b/swiper.el
index 596d4ae..9ce5864 100644
--- a/swiper.el
+++ b/swiper.el
@@ -223,6 +223,9 @@ there have line numbers. In the buffer, `ivy--regex' should
be used."
(t
(ivy--regex-plus str))))
+(defvar swiper-history nil
+ "History for `swiper'.")
+
(defun swiper--ivy (&optional initial-input)
"`isearch' with an overview using `ivy'.
When non-nil, INITIAL-INPUT is the initial search pattern."
@@ -250,7 +253,8 @@ Please remove it and update the \"swiper\" package."))
:require-match t
:update-fn #'swiper--update-input-ivy
:unwind #'swiper--cleanup
- :re-builder #'swiper--re-builder))
+ :re-builder #'swiper--re-builder
+ :history 'swiper-history))
(if (null ivy-exit)
(goto-char swiper--opoint)
(swiper--action res ivy-text)))))