branch: master
commit ff4ce5124278fe61e7456d37d8a0a35eaf106b48
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Don't collect candidates hidden by outlines
* avy-jump.el (avi--regex-candidates): Update.
Fixes #33
---
avy-jump.el | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index bc174cd..e39931d 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -87,11 +87,12 @@ When PRED is non-nil, it's a filter for matching point
positions."
(save-excursion
(goto-char (or beg (window-start)))
(while (re-search-forward regex we t)
- (when (or (null pred)
- (funcall pred))
- (push (cons (cons (match-beginning 0)
- (match-end 0))
- wnd) candidates))))
+ (unless (get-char-property (point) 'invisible)
+ (when (or (null pred)
+ (funcall pred))
+ (push (cons (cons (match-beginning 0)
+ (match-end 0))
+ wnd) candidates)))))
(nreverse candidates))))
(defvar avi--overlay-offset 0