branch: master
commit f92689aaeed851dc9d5bc2dbd17512bb15505716
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy-jump.el (avi--line): Fixup the issue with org outlines
Re #33
---
avy-jump.el | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index 0711280..2ed91db 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -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)))