From 528125e096e1eb528b97776a6abc9ad79398acf9 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Tue, 20 Oct 2015 10:35:37 +0200 Subject: [PATCH] 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 --- avy.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/avy.el b/avy.el index ae0f22b..1291834 100644 --- a/avy.el +++ b/avy.el @@ -485,6 +485,11 @@ Set `avy-style' according to COMMMAND as well." (defun avy--process (candidates overlay-fn) "Select one of CANDIDATES using `avy-read'. 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)) (cands (copy-sequence candidates)) res)