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.
old-master
Oleh Krehel 11 years ago
parent ff4ce51242
commit b61131c3bc
  1. 26
      avy-jump.el

@ -118,10 +118,15 @@ LEAF is ((BEG . END) . WND)."
(avi--overlay (avi--overlay
(propertize (apply #'string (reverse path)) (propertize (apply #'string (reverse path))
'face 'avi-lead-face) 'face 'avi-lead-face)
(if (consp (car leaf)) (cond ((numberp leaf)
(caar leaf) leaf)
(car leaf)) ((consp (car leaf))
(cdr leaf))) (caar leaf))
(t
(car leaf)))
(if (consp leaf)
(cdr leaf)
(selected-window))))
(defun avi--overlay-at (path leaf) (defun avi--overlay-at (path leaf)
"Create an overlay with STR at LEAF. "Create an overlay with STR at LEAF.
@ -152,10 +157,15 @@ LEAF is ((BEG . END) . WND)."
(avi--overlay (avi--overlay
(propertize (apply #'string (reverse path)) (propertize (apply #'string (reverse path))
'face 'avi-lead-face) 'face 'avi-lead-face)
(if (consp (car leaf)) (cond ((numberp leaf)
(cdar leaf) leaf)
(car leaf)) ((consp (car leaf))
(cdr leaf))) (cdar leaf))
(t
(car leaf)))
(if (consp leaf)
(cdr leaf)
(selected-window))))
;;* Commands ;;* Commands
;;;###autoload ;;;###autoload

Loading…
Cancel
Save