Mercurial > emacs
comparison lisp/scroll-bar.el @ 3588:9685f1d5545b
* 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.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 09 Jun 1993 09:44:24 +0000 |
parents | dea00c8a47a6 |
children | f37a9c897699 |
comparison
equal
deleted
inserted
replaced
3587:2b2b70186646 | 3588:9685f1d5545b |
---|---|
90 (window (nth 0 end-position)) | 90 (window (nth 0 end-position)) |
91 (portion-whole (nth 2 end-position))) | 91 (portion-whole (nth 2 end-position))) |
92 (save-excursion | 92 (save-excursion |
93 (set-buffer (window-buffer window)) | 93 (set-buffer (window-buffer window)) |
94 (save-excursion | 94 (save-excursion |
95 (goto-char (scroll-bar-scale portion-whole (buffer-size))) | 95 (goto-char (+ (point-min) |
96 (scroll-bar-scale portion-whole | |
97 (- (point-max) (point-min))))) | |
96 (beginning-of-line) | 98 (beginning-of-line) |
97 (set-window-start window (point)))))) | 99 (set-window-start window (point)))))) |
98 | 100 |
99 ;; Scroll the window to the proper position for EVENT. | 101 ;; Scroll the window to the proper position for EVENT. |
100 (defun scroll-bar-drag-1 (event) | 102 (defun scroll-bar-drag-1 (event) |