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

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

[elpa] externals/ace-window 379413c 60/92: ace-window.el (aw-offset): Up


From: Stefan Monnier
Subject: [elpa] externals/ace-window 379413c 60/92: ace-window.el (aw-offset): Update
Date: Wed, 17 Mar 2021 18:39:22 -0400 (EDT)

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

    ace-window.el (aw-offset): Update
    
    Don't call forward line if the buffer is too small.
    
    Re #131
---
 ace-window.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ace-window.el b/ace-window.el
index bd26474..f660b55 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -775,7 +775,12 @@ The point is writable, i.e. it's not part of space after 
newline."
     (with-current-buffer (window-buffer window)
       (save-excursion
         (goto-char beg)
-        (forward-line (- (aw--face-rel-height) 1))
+        (forward-line (1-
+                       (min
+                        (count-lines
+                         (point)
+                         (point-max))
+                        (aw--face-rel-height))))
         (while (and (< (point) end)
                     (< (- (line-end-position)
                           (line-beginning-position))



reply via email to

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