diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-06-05 20:58:47 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-06-05 20:58:47 +0000 |
commit | d2ae6f7e7aef2682bdb6f5af9295898d9209339c (patch) | |
tree | f2f7d4308c5be7104dc025a0eb6442c6685d5294 /lisp | |
parent | 016494d277e08df62d885a7506eab7bd24a12c13 (diff) | |
download | emacs-d2ae6f7e7aef2682bdb6f5af9295898d9209339c.tar.gz |
(scroll-bar-drag-1):
Calculate position relative to the accessible part of the buffer.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/scroll-bar.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index cddce3e419c..fa7e4a6d3ec 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -103,7 +103,10 @@ EVENT should be a scroll bar click or drag event." (portion-whole (nth 2 start-position))) (save-excursion (set-buffer (window-buffer window)) - (goto-char (scroll-bar-scale portion-whole (buffer-size))) + ;; Calculate position relative to the accessible part of the buffer. + (goto-char (+ (point-min) + (scroll-bar-scale portion-whole + (- (point-max) (point-min))))) (beginning-of-line) (set-window-start window (point))))) |