diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-03-14 08:20:37 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-03-14 08:20:37 +0000 |
commit | 0320e66f47cb51d42ec66d15c54be24ccf0e5075 (patch) | |
tree | bfef45d9521d3bdc281f13d7a93b7ff474ffad81 /lisp/mouse.el | |
parent | 65627aad683a648e510b5dd204f6b18086b99054 (diff) | |
download | emacs-0320e66f47cb51d42ec66d15c54be24ccf0e5075.tar.gz |
(mouse-scroll-subr): Handle if window-end returns nil.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r-- | lisp/mouse.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 4741d5fc8f6..2241578cffc 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -478,11 +478,13 @@ Upon exit, point is at the far edge of the newly visible text." (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))) |