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

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

[elpa] master b61131c 03/17: avy-jump.el (avi--overlay-pre): Handle plai


From: Oleh Krehel
Subject: [elpa] master b61131c 03/17: avy-jump.el (avi--overlay-pre): Handle plain numbers
Date: Fri, 08 May 2015 13:43:38 +0000

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

    avy-jump.el (avi--overlay-pre): Handle plain numbers
    
    * avy-jump.el (avi--overlay-pre):
    (avi--overlay-post): Handle the case of LEAF being a number.
---
 avy-jump.el |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/avy-jump.el b/avy-jump.el
index e39931d..60f4f25 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -118,10 +118,15 @@ LEAF is ((BEG . END) . WND)."
   (avi--overlay
    (propertize (apply #'string (reverse path))
                'face 'avi-lead-face)
-   (if (consp (car leaf))
-       (caar leaf)
-     (car leaf))
-   (cdr leaf)))
+   (cond ((numberp leaf)
+          leaf)
+         ((consp (car leaf))
+          (caar leaf))
+         (t
+          (car leaf)))
+   (if (consp leaf)
+       (cdr leaf)
+     (selected-window))))
 
 (defun avi--overlay-at (path leaf)
   "Create an overlay with STR at LEAF.
@@ -152,10 +157,15 @@ LEAF is ((BEG . END) . WND)."
   (avi--overlay
    (propertize (apply #'string (reverse path))
                'face 'avi-lead-face)
-   (if (consp (car leaf))
-       (cdar leaf)
-     (car leaf))
-   (cdr leaf)))
+   (cond ((numberp leaf)
+          leaf)
+         ((consp (car leaf))
+          (cdar leaf))
+         (t
+          (car leaf)))
+   (if (consp leaf)
+       (cdr leaf)
+     (selected-window))))
 
 ;;* Commands
 ;;;###autoload



reply via email to

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