Fix jumping to the last char of a folded Org outline

avy.el (avy--read-candidates): For the last char in the
outline, (get-char-property (point) 'invisible) returns t, although it's
still visible.

Re #100
This commit is contained in:
Oleh Krehel 2015-10-22 10:26:26 +02:00
parent df181f1e77
commit 964664c9fd

2
avy.el
View File

@ -1140,7 +1140,7 @@ This function obeys `avy-all-windows' setting."
(goto-char (car pair)) (goto-char (car pair))
(setq regex (regexp-quote str)) (setq regex (regexp-quote str))
(while (re-search-forward regex (cdr pair) t) (while (re-search-forward regex (cdr pair) t)
(unless (get-char-property (point) 'invisible) (unless (get-char-property (1- (point)) 'invisible)
(let ((ov (make-overlay (let ((ov (make-overlay
(match-beginning 0) (match-beginning 0)
(match-end 0)))) (match-end 0))))