branch: master
commit f31ab12696d9a54887c1b20372c229c9b4d78a8a
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper--ivy): Return point
Fixes #370
---
swiper.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/swiper.el b/swiper.el
index 6ac16c5..c5c4a1f 100644
--- a/swiper.el
+++ b/swiper.el
@@ -381,20 +381,22 @@ When non-nil, INITIAL-INPUT is the initial search
pattern."
(minibuffer-allow-text-properties t)
res)
(unwind-protect
- (setq res
- (ivy-read
- "Swiper: "
- candidates
- :initial-input initial-input
- :keymap swiper-map
- :preselect preselect
- :require-match t
- :update-fn #'swiper--update-input-ivy
- :unwind #'swiper--cleanup
- :action #'swiper--action
- :re-builder #'swiper--re-builder
- :history 'swiper-history
- :caller 'swiper))
+ (and
+ (setq res
+ (ivy-read
+ "Swiper: "
+ candidates
+ :initial-input initial-input
+ :keymap swiper-map
+ :preselect preselect
+ :require-match t
+ :update-fn #'swiper--update-input-ivy
+ :unwind #'swiper--cleanup
+ :action #'swiper--action
+ :re-builder #'swiper--re-builder
+ :history 'swiper-history
+ :caller 'swiper))
+ (point))
(unless res
(goto-char swiper--opoint)))))