# HG changeset patch # User Kim F. Storm # Date 1158671570 0 # Node ID 291287d0fa385bed080d6dba0f3c9fc57ae9a7cf # Parent 0782f0fe772b3fe432c49fd228af918916e732b6 (line-move-partial): Optimize. Try window-line-height before posn-at-point to get vpos of current line. diff -r 0782f0fe772b -r 291287d0fa38 lisp/simple.el --- 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,