summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 0a257863a76..5a30471ca49 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3507,9 +3507,11 @@ Outline mode sets this."
nil)
;; If cursor is not in the bottom scroll margin, move forward.
((and (> vpos 0)
- (< (setq ppos (posn-at-point)
- py (cdr (or (posn-actual-col-row ppos)
- (posn-col-row ppos))))
+ (< (setq py
+ (or (nth 1 (window-line-height))
+ (let ((ppos (posn-at-point)))
+ (cdr (or (posn-actual-col-row ppos)
+ (posn-col-row ppos))))))
(min (- (window-text-height) scroll-margin 1) (1- vpos))))
nil)
;; When already vscrolled, we vscroll some more if we can,