summaryrefslogtreecommitdiff
path: root/lisp/scroll-bar.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-06-09 09:44:24 +0000
committerJim Blandy <jimb@redhat.com>1993-06-09 09:44:24 +0000
commite444050b4006c6677ae905707e8847110f8f1e4e (patch)
treefe1749c7040489b6e2ebf19af22328ab9da8e6f9 /lisp/scroll-bar.el
parent02285aa4151cb139d0d4e64d84919da65236f9c1 (diff)
downloademacs-e444050b4006c6677ae905707e8847110f8f1e4e.tar.gz
* scroll-bar.el (scroll-bar-set-window-start): Remember that the
scroll bar numbers reflect the accessible region of the buffer, not the entire buffer.
Diffstat (limited to 'lisp/scroll-bar.el')
-rw-r--r--lisp/scroll-bar.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index fa7e4a6d3ec..3e30e1b5e7d 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -92,7 +92,9 @@ EVENT should be a scroll bar click or drag event."
(save-excursion
(set-buffer (window-buffer window))
(save-excursion
- (goto-char (scroll-bar-scale portion-whole (buffer-size)))
+ (goto-char (+ (point-min)
+ (scroll-bar-scale portion-whole
+ (- (point-max) (point-min)))))
(beginning-of-line)
(set-window-start window (point))))))