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

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

[elpa] externals/ivy-hydra d1ba9b8 269/395: ivy.el (ivy-resume): Refresh


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra d1ba9b8 269/395: ivy.el (ivy-resume): Refresh on modified buffer for swiper-isearch
Date: Thu, 25 Feb 2021 08:32:17 -0500 (EST)

branch: externals/ivy-hydra
commit d1ba9b863edf76f0617214dff96314ec907577c6
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy-resume): Refresh on modified buffer for swiper-isearch
    
    Fixes #2372
---
 ivy.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index e77e5a7..46554db 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2359,6 +2359,8 @@ This is useful for recursive `ivy-read'."
               (let ((init (ivy-alist-setting ivy-initial-inputs-alist caller)))
                 (if (functionp init) (funcall init) init))))
          (def (ivy-state-def state)))
+    (when (and (eq caller 'swiper-isearch) (buffer-modified-p))
+      (setq preselect nil))
     (setq ivy--extra-candidates (ivy--compute-extra-candidates caller))
     (setq ivy--directory nil)
     (setq ivy--directory-hist nil)
@@ -2449,7 +2451,7 @@ This is useful for recursive `ivy-read'."
                                                counsel-switch-buffer)))
                          predicate)))
             (dynamic-collection
-             (setq coll (if (eq this-command 'ivy-resume)
+             (setq coll (if (and (eq this-command 'ivy-resume) (not 
(buffer-modified-p)))
                             ivy--all-candidates
                           (ivy--dynamic-collection-cands (or initial-input 
"")))))
             ((consp (car-safe collection))



reply via email to

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