2001-07-23 Gerd Moellmann <gerd@gnu.org>
+ * dispnew.c (adjust_glyph_matrix): In the optimization for
+ windows whose height has changed, use the new window height
+ to compute which rows to invalidate.
+
* editfns.c (toplevel) [STDC_HEADERS]: Include float.h.
(MAX_10_EXP): New macro.
(Fformat): Use it.
&& matrix->window_top_y == XFASTINT (w->top)
&& matrix->window_width == window_width)
{
- i = 0;
- while (matrix->rows[i].enabled_p
- && (MATRIX_ROW_BOTTOM_Y (matrix->rows + i)
- < matrix->window_height))
- ++i;
+ /* Find the last row in the window. */
+ for (i = 0; i < matrix->nrows && matrix->rows[i].enabled_p; ++i)
+ if (MATRIX_ROW_BOTTOM_Y (matrix->rows + i) >= window_height)
+ {
+ ++i;
+ break;
+ }
/* Window end is invalid, if inside of the rows that
- are invalidated. */
+ are invalidated below. */
if (INTEGERP (w->window_end_vpos)
&& XFASTINT (w->window_end_vpos) >= i)
w->window_end_valid = Qnil;