comparison lisp/mouse.el @ 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 bbbd345f54de
children 7a7950ffa79b
comparison
equal deleted inserted replaced
21175:e260c4389363 21176:c42a2b3bbb21
476 (goto-char (window-start window)) 476 (goto-char (window-start window))
477 (if (not (zerop (vertical-motion jump window))) 477 (if (not (zerop (vertical-motion jump window)))
478 (progn 478 (progn
479 (set-window-start window (point)) 479 (set-window-start window (point))
480 (if (natnump jump) 480 (if (natnump jump)
481 (progn 481 (if (window-end window)
482 (goto-char (window-end window)) 482 (progn
483 ;; window-end doesn't reflect the window's new 483 (goto-char (window-end window))
484 ;; start position until the next redisplay. Hurrah. 484 ;; window-end doesn't reflect the window's new
485 (vertical-motion (1- jump) window)) 485 ;; start position until the next redisplay.
486 (vertical-motion (1- jump) window))
487 (vertical-motion (- (window-height window) 2)))
486 (goto-char (window-start window))) 488 (goto-char (window-start window)))
487 (if overlay 489 (if overlay
488 (move-overlay overlay start (point))) 490 (move-overlay overlay start (point)))
489 ;; Now that we have scrolled WINDOW properly, 491 ;; Now that we have scrolled WINDOW properly,
490 ;; put point back where it was for the redisplay 492 ;; put point back where it was for the redisplay