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

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

[elpa] externals/ace-window ab0db6a 82/92: ace-window.el (aw--lead-overl


From: Stefan Monnier
Subject: [elpa] externals/ace-window ab0db6a 82/92: ace-window.el (aw--lead-overlay): Make sure the overlay is within window
Date: Wed, 17 Mar 2021 18:39:27 -0400 (EDT)

branch: externals/ace-window
commit ab0db6a2c3b1c3d9240667df1e1d9cafa2756376
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ace-window.el (aw--lead-overlay): Make sure the overlay is within window
    
    Fixes #175
    
    The issue was introduced in a429c66f318af0452a009f96b39a18f9b0fe232b by
    the window-hscroll logic. Maybe it's good to check the fix still works.
    
    Re #165
---
 ace-window.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index 445ed78..55d1ef7 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -359,7 +359,8 @@ LEAF is (PT . WND)."
                   (not (zerop (window-hscroll)))
                   (progn (push (cons (selected-window) (window-hscroll)) 
aw--windows-hscroll) t)
                   (not (zerop (scroll-right)))))
-      (let* ((prev)
+      (let* ((ws (window-start))
+             (prev nil)
              (vertical-pos (if (eq aw-char-position 'left) -1 0))
              (horizontal-pos (if (zerop (window-hscroll)) 0 (1+ 
(window-hscroll))))
              (pt
@@ -372,7 +373,7 @@ LEAF is (PT . WND)."
                 ;; Find a nearby point that is not at the end-of-line but
                 ;; is visible so have space for the overlay.
                 (setq prev (1- (point)))
-                (while (and (/= prev (point)) (eolp))
+                (while (and (>= prev ws) (/= prev (point)) (eolp))
                   (setq prev (point))
                   (unless (bobp)
                     (line-move -1 t)



reply via email to

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