Mercurial > emacs
comparison lisp/simple.el @ 59701:5f125540565b
* simple.el (line-move): Adapt to new return value from
pos-visible-in-window-p.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 23 Jan 2005 13:28:16 +0000 |
parents | 815c3e98edef |
children | ec7c04e04f71 befae6bafecb |
comparison
equal
deleted
inserted
replaced
59700:c401b93db575 | 59701:5f125540565b |
---|---|
3181 | 3181 |
3182 ;; Perform vertical scrolling of tall images if necessary. | 3182 ;; Perform vertical scrolling of tall images if necessary. |
3183 (defun line-move (arg &optional noerror to-end) | 3183 (defun line-move (arg &optional noerror to-end) |
3184 (if auto-window-vscroll | 3184 (if auto-window-vscroll |
3185 (let ((forward (> arg 0)) | 3185 (let ((forward (> arg 0)) |
3186 (pvis (pos-visible-in-window-p (point) nil t))) | 3186 (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
3187 (if (and pvis (null (nth 2 pvis)) | 3187 (if (and (consp part) |
3188 (> (nth (if forward 4 3) pvis) 0)) | 3188 (> (setq part (if forward (cdr part) (car part))) 0)) |
3189 (set-window-vscroll nil | 3189 (set-window-vscroll nil |
3190 (if forward | 3190 (if forward |
3191 (+ (window-vscroll nil t) | 3191 (+ (window-vscroll nil t) |
3192 (min (nth 4 pvis) | 3192 (min part |
3193 (* (frame-char-height) arg))) | 3193 (* (frame-char-height) arg))) |
3194 (max 0 | 3194 (max 0 |
3195 (- (window-vscroll nil t) | 3195 (- (window-vscroll nil t) |
3196 (min (nth 3 pvis) | 3196 (min part |
3197 (* (frame-char-height) (- arg)))))) | 3197 (* (frame-char-height) (- arg)))))) |
3198 t) | 3198 t) |
3199 (set-window-vscroll nil 0) | 3199 (set-window-vscroll nil 0) |
3200 (line-move-1 arg noerror to-end))) | 3200 (line-move-1 arg noerror to-end))) |
3201 (line-move-1 arg noerror to-end))) | 3201 (line-move-1 arg noerror to-end))) |