[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c |
Date: |
Fri, 28 Mar 2003 09:11:55 -0500 |
Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.823 emacs/src/xdisp.c:1.824
*** emacs/src/xdisp.c:1.823 Wed Mar 26 22:04:22 2003
--- emacs/src/xdisp.c Fri Mar 28 09:11:55 2003
***************
*** 11210,11215 ****
--- 11210,11250 ----
return rc;
}
+ void
+ set_vertical_scroll_bar (w)
+ struct window *w;
+ {
+ int start, end, whole;
+
+ /* Calculate the start and end positions for the current window.
+ At some point, it would be nice to choose between scrollbars
+ which reflect the whole buffer size, with special markers
+ indicating narrowing, and scrollbars which reflect only the
+ visible region.
+
+ Note that mini-buffers sometimes aren't displaying any text. */
+ if (!MINI_WINDOW_P (w)
+ || (w == XWINDOW (minibuf_window)
+ && NILP (echo_area_buffer[0])))
+ {
+ struct buffer *buf = XBUFFER (w->buffer);
+ whole = BUF_ZV (buf) - BUF_BEGV (buf);
+ start = marker_position (w->start) - BUF_BEGV (buf);
+ /* I don't think this is guaranteed to be right. For the
+ moment, we'll pretend it is. */
+ end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf);
+
+ if (end < start)
+ end = start;
+ if (whole < (end - start))
+ whole = end - start;
+ }
+ else
+ start = end = whole = 0;
+
+ /* Indicate what this scroll bar ought to be displaying now. */
+ set_vertical_scroll_bar_hook (w, end - start, whole, start);
+ }
/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only
selected_window is redisplayed.
***************
*** 11899,11933 ****
if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
{
! int start, end, whole;
!
! /* Calculate the start and end positions for the current window.
! At some point, it would be nice to choose between scrollbars
! which reflect the whole buffer size, with special markers
! indicating narrowing, and scrollbars which reflect only the
! visible region.
!
! Note that mini-buffers sometimes aren't displaying any text. */
! if (!MINI_WINDOW_P (w)
! || (w == XWINDOW (minibuf_window)
! && NILP (echo_area_buffer[0])))
! {
! whole = ZV - BEGV;
! start = marker_position (w->start) - BEGV;
! /* I don't think this is guaranteed to be right. For the
! moment, we'll pretend it is. */
! end = (Z - XFASTINT (w->window_end_pos)) - BEGV;
!
! if (end < start)
! end = start;
! if (whole < (end - start))
! whole = end - start;
! }
! else
! start = end = whole = 0;
!
! /* Indicate what this scroll bar ought to be displaying now. */
! set_vertical_scroll_bar_hook (w, end - start, whole, start);
/* Note that we actually used the scroll bar attached to this
window, so it shouldn't be deleted at the end of redisplay. */
--- 11934,11941 ----
if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
{
! /* Set the thumb's position and size. */
! set_vertical_scroll_bar (w);
/* Note that we actually used the scroll bar attached to this
window, so it shouldn't be deleted at the end of redisplay. */
- [Emacs-diffs] Changes to emacs/src/xdisp.c, (continued)
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/18
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Jan Djärv, 2003/03/22
- [Emacs-diffs] Changes to emacs/src/xdisp.c, John Paul Wallington, 2003/03/23
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Andrew Choi, 2003/03/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Jan Djärv, 2003/03/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M. Stallman, 2003/03/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Andreas Schwab, 2003/03/30