branch: externals/ace-window
commit 379413cad156c216c38330c7898062e98e81f8f6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
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))