Function: scroll-bar-scroll-down
scroll-bar-scroll-down is an interactive and byte-compiled function
defined in scroll-bar.el.gz.
Signature
(scroll-bar-scroll-down EVENT)
Documentation
Scroll the window's top line down to the location of the scroll bar click.
EVENT should be a scroll bar click.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/scroll-bar.el.gz
(defun scroll-bar-scroll-down (event)
"Scroll the window's top line down to the location of the scroll bar click.
EVENT should be a scroll bar click."
(interactive "e")
(let* ((end-position (event-end event))
(window (nth 0 end-position))
(before-scroll))
(with-current-buffer (window-buffer window)
(setq before-scroll point-before-scroll))
(unwind-protect
(save-selected-window
(let ((portion-whole (nth 2 end-position)))
(select-window window 'mark-for-redisplay)
(setq before-scroll
(or before-scroll (point)))
(scroll-down
(scroll-bar-scale portion-whole (1- (window-height)))))
(sit-for 0))
(with-current-buffer (window-buffer window)
(setq point-before-scroll before-scroll)))))