From 257a694c19b6d1b3369820a9c06a807f52087026 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:28:16 +0000 Subject: [PATCH] * simple.el (line-move): Adapt to new return value from pos-visible-in-window-p. --- lisp/simple.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 02ce351c50b..3db2a418f3b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3183,17 +3183,17 @@ Outline mode sets this." (defun line-move (arg &optional noerror to-end) (if auto-window-vscroll (let ((forward (> arg 0)) - (pvis (pos-visible-in-window-p (point) nil t))) - (if (and pvis (null (nth 2 pvis)) - (> (nth (if forward 4 3) pvis) 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)) (set-window-vscroll nil (if forward (+ (window-vscroll nil t) - (min (nth 4 pvis) + (min part (* (frame-char-height) arg))) (max 0 (- (window-vscroll nil t) - (min (nth 3 pvis) + (min part (* (frame-char-height) (- arg)))))) t) (set-window-vscroll nil 0) -- 2.39.2