emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master c911850 031/110: avy.el (avy--overlay-at-full): Fix for vi


From: Oleh Krehel
Subject: [elpa] master c911850 031/110: avy.el (avy--overlay-at-full): Fix for visual-line-mode
Date: Sat, 11 May 2019 10:15:38 -0400 (EDT)

branch: master
commit c911850a459465bcbc644f3fbb40fdc9b2a049f1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]