]> code.delx.au - gnu-emacs-elpa/commitdiff
swiper.el (swiper--ivy): Return point
authorOleh Krehel <ohwoeowho@gmail.com>
Sat, 30 Jan 2016 08:35:57 +0000 (09:35 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Sat, 30 Jan 2016 08:35:57 +0000 (09:35 +0100)
Fixes #370

swiper.el

index 6ac16c5f66f8081274e5f87cb4edf1c1e03b6109..c5c4a1f9f821c4be75d45f798ae7410b769d3f4b 100644 (file)
--- 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)))))