Function: scroll-bar-horizontal-drag-1
scroll-bar-horizontal-drag-1 is a byte-compiled function defined in
scroll-bar.el.gz.
Signature
(scroll-bar-horizontal-drag-1 EVENT)
Source Code
;; Defined in /usr/src/emacs/lisp/scroll-bar.el.gz
;; Scroll the window to the proper position for EVENT.
(defun scroll-bar-horizontal-drag-1 (event)
(let* ((start-position (event-start event))
(window (nth 0 start-position))
(portion-whole (nth 2 start-position))
(unit (frame-char-width (window-frame window))))
(if (eq (current-bidi-paragraph-direction (window-buffer window))
'left-to-right)
(set-window-hscroll
window (/ (+ (car portion-whole) (1- unit)) unit))
(set-window-hscroll
window (/ (+ (- (cdr portion-whole) (car portion-whole))
(1- unit))
unit)))))