Mercurial > emacs
changeset 3508:dea00c8a47a6
(scroll-bar-drag-1):
Calculate position relative to the accessible part of the buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 05 Jun 1993 20:58:47 +0000 |
parents | d25bc92a64b4 |
children | a1ef317ceb18 |
files | lisp/scroll-bar.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/scroll-bar.el Sat Jun 05 20:52:02 1993 +0000 +++ b/lisp/scroll-bar.el Sat Jun 05 20:58:47 1993 +0000 @@ -103,7 +103,10 @@ (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)))))