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

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

[elpa] master 4e9e310 368/399: ivy.el (ivy-read): Fix swiper-query-repla


From: Oleh Krehel
Subject: [elpa] master 4e9e310 368/399: ivy.el (ivy-read): Fix swiper-query-replace not working
Date: Sat, 20 Jul 2019 14:58:01 -0400 (EDT)

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

    ivy.el (ivy-read): Fix swiper-query-replace not working
    
    Need to return (ivy-state-current ivy-last) from that specific point,
    since later `ivy-last' changes to the outer one of `swiper'.
---
 ivy.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 83750b2..99613b0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1973,7 +1973,8 @@ customizations apply to the current completion session."
          (ivy--display-function
           (when (or ivy-recursive-last
                     (not (window-minibuffer-p)))
-            (ivy-alist-setting ivy-display-functions-alist caller))))
+            (ivy-alist-setting ivy-display-functions-alist caller)))
+         result)
     (setq ivy-last
           (make-ivy-state
            :prompt prompt
@@ -2033,10 +2034,12 @@ customizations apply to the current completion session."
                  (unless (equal item "")
                    (set hist (cons (propertize item 'ivy-index ivy--index)
                                    (delete item
-                                           (cdr (symbol-value hist))))))))))
+                                           (cdr (symbol-value hist))))))))
+             (setq result (ivy-state-current ivy-last))))
       (ivy--cleanup))
     (ivy-call)
-    (ivy--remove-props (ivy-state-current ivy-last) 'idx)))
+    (ivy--remove-props (ivy-state-current ivy-last) 'idx)
+    result))
 
 (defun ivy--cleanup ()
   ;; Fixes a bug in ESS, #1660



reply via email to

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