the start of the visible region, too.
start = startp - BEGV;
/* I don't think this is guaranteed to be right. For the
moment, we'll pretend it is. */
start = startp - BEGV;
/* I don't think this is guaranteed to be right. For the
moment, we'll pretend it is. */
- end = (Z - XINT (w->window_end_pos));
+ end = (Z - XINT (w->window_end_pos)) - BEGV;
if (end < start) end = start;
if (whole < (end - start)) whole = end - start;
if (end < start) end = start;
if (whole < (end - start)) whole = end - start;