mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
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.
This commit is contained in:
parent
7cfe11e3c1
commit
7c40f5e381
5
avy.el
5
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user