comparison src/xdisp.c @ 2874:80805283464a

* xdisp.c (redisplay_window): Make the scrollbar reflect the extent of the visible region, not the whole buffer.
author Jim Blandy <jimb@redhat.com>
date Tue, 18 May 1993 22:45:53 +0000
parents 3bcbd1795280
children e52ea063421a
comparison
equal deleted inserted replaced
2873:f1cd54cf1b67 2874:80805283464a
1058 if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)) 1058 if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
1059 { 1059 {
1060 int start, end, whole; 1060 int start, end, whole;
1061 1061
1062 /* Calculate the start and end positions for the current window. 1062 /* Calculate the start and end positions for the current window.
1063 At some point, it would be nice to choose between scrollbars
1064 which reflect the whole buffer size, with special markers
1065 indicating narrowing, and scrollbars which reflect only the
1066 visible region.
1067
1063 Note that minibuffers sometimes aren't displaying any text. */ 1068 Note that minibuffers sometimes aren't displaying any text. */
1064 if (! MINI_WINDOW_P (w) 1069 if (! MINI_WINDOW_P (w)
1065 || (w == XWINDOW (minibuf_window) && ! echo_area_glyphs)) 1070 || (w == XWINDOW (minibuf_window) && ! echo_area_glyphs))
1066 { 1071 {
1067 start = startp; 1072 start = startp;
1068 /* I don't think this is guaranteed to be right. For the 1073 /* I don't think this is guaranteed to be right. For the
1069 moment, we'll pretend it is. */ 1074 moment, we'll pretend it is. */
1070 end = Z - XINT (w->window_end_pos); 1075 end = Z - XINT (w->window_end_pos);
1071 whole = Z - BEG; 1076 whole = ZV - BEGV;
1077
1078 if (end < start) end = start;
1079 if (whole > (end - start)) whole = end - start;
1072 } 1080 }
1073 else 1081 else
1074 start = end = whole = 0; 1082 start = end = whole = 0;
1075 1083
1076 /* Indicate what this scroll bar ought to be displaying now. */ 1084 /* Indicate what this scroll bar ought to be displaying now. */