HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
016494d
)
(scroll-bar-drag-1):
author
Richard M. Stallman
<rms@gnu.org>
Sat, 5 Jun 1993 20:58:47 +0000
(20:58 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sat, 5 Jun 1993 20:58:47 +0000
(20:58 +0000)
Calculate position relative to the accessible part of the buffer.
lisp/scroll-bar.el
patch
|
blob
|
blame
|
history
diff --git
a/lisp/scroll-bar.el
b/lisp/scroll-bar.el
index
cddce3e
..
fa7e4a6
100644
(file)
--- 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)))))