event for Xaw and Xaw3d(without arrows) scrollbars.
1999-11-19 Stefan Monnier <monnier@cs.yale.edu>
+ * scroll-bar.el (scroll-bar-toolkit-scroll): add handling of the `ratio'
+ event for Xaw and Xaw3d(without arrows) scrollbars.
+
* files.el (auto-mode-alist): add patterns for diff-mode.
* complete.el (PC-do-complete-and-exit): use minibuffer-prompt-end to
(scroll-up '-))
((eq part 'below-handle)
(scroll-up nil))
+ ((eq part 'ratio)
+ (let* ((portion-whole (nth 2 end-position))
+ (lines (scroll-bar-scale portion-whole
+ (1- (window-height)))))
+ (scroll-up (cond ((not (zerop lines)) lines)
+ ((< (car portion-whole) 0) -1)
+ (t 1)))))
((eq part 'up)
(scroll-up -1))
((eq part 'down)
(sit-for 0)
(unless scroll-bar-timer
(setq scroll-bar-timer
- (run-with-timer 0.1 0.1 'xt-process-timeouts)))
+ (run-with-timer 0.1 0.1 'xt-process-timeouts)))
(with-current-buffer (window-buffer window)
(setq point-before-scroll before-scroll))))))