mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
avy.el (avy--process): Add window to candidates if not present
`avy-read-de-bruijn' relies on the window being the cdr of each candidate. Fixes abo-abo/ace-link#22
This commit is contained in:
parent
f7ddd4b687
commit
528125e096
5
avy.el
5
avy.el
@ -485,6 +485,11 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(defun avy--process (candidates overlay-fn)
|
(defun avy--process (candidates overlay-fn)
|
||||||
"Select one of CANDIDATES using `avy-read'.
|
"Select one of CANDIDATES using `avy-read'.
|
||||||
Use OVERLAY-FN to visualize the decision overlay."
|
Use OVERLAY-FN to visualize the decision overlay."
|
||||||
|
(unless (and (consp (car candidates))
|
||||||
|
(windowp (cdar candidates)))
|
||||||
|
(setq candidates
|
||||||
|
(mapcar (lambda (x) (cons x (selected-window)))
|
||||||
|
candidates)))
|
||||||
(let ((len (length candidates))
|
(let ((len (length candidates))
|
||||||
(cands (copy-sequence candidates))
|
(cands (copy-sequence candidates))
|
||||||
res)
|
res)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user