diff options
author | Jim Blandy <jimb@redhat.com> | 1993-06-09 09:44:24 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-06-09 09:44:24 +0000 |
commit | 4cad38d5ed515f4e5707173502739c320770a4a5 (patch) | |
tree | 168a5b0b249d6ed0e8e18b96093306b189b5b69c /lisp/scroll-bar.el | |
parent | 8eda6c512fc48f6b3c166bf1026a7759529e7cba (diff) | |
download | emacs-4cad38d5ed515f4e5707173502739c320770a4a5.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.el | 4 |
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)))))) |