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

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

[elpa] master 528125e 40/78: avy.el (avy--process): Add window to candid


From: Oleh Krehel
Subject: [elpa] master 528125e 40/78: avy.el (avy--process): Add window to candidates if not present
Date: Sat, 23 Jan 2016 13:59:58 +0000

branch: master
commit 528125e096e1eb528b97776a6abc9ad79398acf9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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 files changed, 5 insertions(+), 0 deletions(-)

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)



reply via email to

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