Mercurial > emacs
changeset 21176:c42a2b3bbb21
(mouse-scroll-subr): Handle if window-end returns nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 14 Mar 1998 08:20:37 +0000 |
parents | e260c4389363 |
children | 73f8ae8312c8 |
files | lisp/mouse.el |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mouse.el Sat Mar 14 08:19:27 1998 +0000 +++ b/lisp/mouse.el Sat Mar 14 08:20:37 1998 +0000 @@ -478,11 +478,13 @@ (progn (set-window-start window (point)) (if (natnump jump) - (progn - (goto-char (window-end window)) - ;; window-end doesn't reflect the window's new - ;; start position until the next redisplay. Hurrah. - (vertical-motion (1- jump) window)) + (if (window-end window) + (progn + (goto-char (window-end window)) + ;; window-end doesn't reflect the window's new + ;; start position until the next redisplay. + (vertical-motion (1- jump) window)) + (vertical-motion (- (window-height window) 2))) (goto-char (window-start window))) (if overlay (move-overlay overlay start (point)))