Mercurial > emacs
changeset 72992:291287d0fa38
(line-move-partial): Optimize. Try window-line-height
before posn-at-point to get vpos of current line.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 19 Sep 2006 13:12:50 +0000 |
parents | 0782f0fe772b |
children | f9bd256c3d41 |
files | lisp/simple.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Sep 19 13:12:26 2006 +0000 +++ b/lisp/simple.el Tue Sep 19 13:12:50 2006 +0000 @@ -3507,9 +3507,11 @@ 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,