Skip to content

Commit

Permalink
avy-jump.el (avi--line): Fixup the issue with org outlines
Browse files Browse the repository at this point in the history
Re #33
  • Loading branch information
abo-abo committed May 4, 2015
1 parent 17b44a8 commit f92689a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions avy-jump.el
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,17 @@ Read one char with which the word should start."
(defun avi--line ()
"Select line in current window."
(let ((avi-background nil)
(ws (window-start))
candidates)
(save-excursion
(save-restriction
(narrow-to-region (window-start) (window-end (selected-window) t))
(narrow-to-region ws (window-end (selected-window) t))
(goto-char (point-min))
(while (< (point) (point-max))
(push (cons (point) (selected-window))
candidates)
(unless (get-char-property
(max (1- (point)) ws) 'invisible)
(push (cons (point) (selected-window))
candidates))
(forward-line 1))))
(avi--process (nreverse candidates) #'avi--overlay-pre)))

Expand Down

0 comments on commit f92689a

Please sign in to comment.