aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index ba33e111387..562e10aafbd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1060,6 +1060,11 @@ done:
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))
@@ -1068,7 +1073,10 @@ done:
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;