emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master ac09f6b 152/167: Fix the issue caused by recursive swiper


From: Oleh Krehel
Subject: [elpa] master ac09f6b 152/167: Fix the issue caused by recursive swiper calls
Date: Tue, 08 Dec 2015 10:50:39 +0000

branch: master
commit ac09f6b2ea56d7f1d7c46ce4659907ec1fb079bf
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Fix the issue caused by recursive swiper calls
    
    * swiper.el (swiper--ivy): Look at the return result of `ivy-read';
    looking at `ivy-exit' no longer works.
    
    Fixes #311
---
 swiper.el |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/swiper.el b/swiper.el
index a744de9..45492a1 100644
--- a/swiper.el
+++ b/swiper.el
@@ -353,22 +353,24 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
               (point-min)
               (save-excursion (beginning-of-visual-line) (point)))
            (1- (line-number-at-pos))))
-        (minibuffer-allow-text-properties t))
+        (minibuffer-allow-text-properties t)
+        res)
     (unwind-protect
-         (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)
-      (when (null ivy-exit)
+         (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))
+      (unless res
         (goto-char swiper--opoint)))))
 
 (defun swiper-toggle-face-matching ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]