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

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

[elpa] master 7c40f5e 075/110: avy.el (avy--process): Fix the candidates


From: Oleh Krehel
Subject: [elpa] master 7c40f5e 075/110: avy.el (avy--process): Fix the candidates list being modified when restarting
Date: Sat, 11 May 2019 10:15:47 -0400 (EDT)

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

    avy.el (avy--process): Fix the candidates list being modified when 
restarting
    
    For example, with multiple windows, `avy-goto-char' followed by "x"
    would change the overlays to a subset of the overlays in the current window.
---
 avy.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/avy.el b/avy.el
index 38ca4f8..420bd1d 100644
--- a/avy.el
+++ b/avy.el
@@ -756,13 +756,14 @@ Use OVERLAY-FN to visualize the decision overlay."
     (setq candidates
           (mapcar (lambda (x) (cons x (selected-window)))
                   candidates)))
-  (let ((res (avy--process-1 candidates overlay-fn)))
+  (let ((original-cands (copy-sequence candidates))
+        (res (avy--process-1 candidates overlay-fn)))
     (cond
       ((null res)
        (message "zero candidates")
        t)
       ((eq res 'restart)
-       (avy--process candidates overlay-fn))
+       (avy--process original-cands overlay-fn))
       ;; ignore exit from `avy-handler-function'
       ((eq res 'exit))
       (t



reply via email to

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