From 0fc367df131fab89a983198790c5437748d6f5cb Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:48:21 +0000 Subject: [PATCH] (line-move): Only call sit-for when moving backwards. --- lisp/simple.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b50707531d1..9a4ba9badcf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3351,25 +3351,25 @@ Outline mode sets this." (let ((forward (> arg 0)) (part (nth 2 (pos-visible-in-window-p (point) nil t)))) (if (and (consp part) - (> (setq part (if forward (cdr part) (car part))) 0)) + (> (if forward (cdr part) (car part)) 0)) (set-window-vscroll nil (if forward (+ (window-vscroll nil t) - (min part + (min (cdr part) (* (frame-char-height) arg))) (max 0 (- (window-vscroll nil t) - (min part + (min (car part) (* (frame-char-height) (- arg)))))) t) (set-window-vscroll nil 0) (when (line-move-1 arg noerror to-end) - (sit-for 0) - (if (and (not forward) - (setq part (nth 2 (pos-visible-in-window-p - (line-beginning-position) nil t))) - (> (cdr part) 0)) - (set-window-vscroll nil (cdr part) t)) + (when (not forward) + (sit-for 0) + (if (and (setq part (nth 2 (pos-visible-in-window-p + (line-beginning-position) nil t))) + (> (cdr part) 0)) + (set-window-vscroll nil (cdr part) t))) t))) (line-move-1 arg noerror to-end))) -- 2.39.5