Commit 0fc367df authored by Kim F. Storm's avatar Kim F. Storm

(line-move): Only call sit-for when moving backwards.

parent 555228aa
...@@ -3351,25 +3351,25 @@ Outline mode sets this." ...@@ -3351,25 +3351,25 @@ Outline mode sets this."
(let ((forward (> arg 0)) (let ((forward (> arg 0))
(part (nth 2 (pos-visible-in-window-p (point) nil t)))) (part (nth 2 (pos-visible-in-window-p (point) nil t))))
(if (and (consp part) (if (and (consp part)
(> (setq part (if forward (cdr part) (car part))) 0)) (> (if forward (cdr part) (car part)) 0))
(set-window-vscroll nil (set-window-vscroll nil
(if forward (if forward
(+ (window-vscroll nil t) (+ (window-vscroll nil t)
(min part (min (cdr part)
(* (frame-char-height) arg))) (* (frame-char-height) arg)))
(max 0 (max 0
(- (window-vscroll nil t) (- (window-vscroll nil t)
(min part (min (car part)
(* (frame-char-height) (- arg)))))) (* (frame-char-height) (- arg))))))
t) t)
(set-window-vscroll nil 0) (set-window-vscroll nil 0)
(when (line-move-1 arg noerror to-end) (when (line-move-1 arg noerror to-end)
(sit-for 0) (when (not forward)
(if (and (not forward) (sit-for 0)
(setq part (nth 2 (pos-visible-in-window-p (if (and (setq part (nth 2 (pos-visible-in-window-p
(line-beginning-position) nil t))) (line-beginning-position) nil t)))
(> (cdr part) 0)) (> (cdr part) 0))
(set-window-vscroll nil (cdr part) t)) (set-window-vscroll nil (cdr part) t)))
t))) t)))
(line-move-1 arg noerror to-end))) (line-move-1 arg noerror to-end)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment