branch: master
commit c911850a459465bcbc644f3fbb40fdc9b2a049f1
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy--overlay-at-full): Fix for visual-line-mode
`end-of-visual-line' is bugged somehow:
This code sometimes produces (point) < beg:
(goto-char beg)
(save-excursion
(end-of-visual-line)
(point))
which should never happen.
Re #179
---
avy.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/avy.el b/avy.el
index 615debd..e1ef07c 100644
--- a/avy.el
+++ b/avy.el
@@ -838,6 +838,10 @@ LEAF is normally ((BEG . END) . WND)."
(end-of-visual-line)
(point))
(line-end-position)))
+ ;; `end-of-visual-line' is bugged sometimes
+ (lep (if (< lep beg)
+ (line-end-position)
+ lep))
(len-and-str (avy--update-offset-and-str len str lep)))
(setq len (car len-and-str))
(setq str (cdr len-and-str))