# HG changeset patch # User Gerd Moellmann # Date 995888022 0 # Node ID c867615c6a26d8321996b899f629425f131b3e20 # Parent 71c6489a2aff2673337adb6fc9f779e83398d1e5 (adjust_glyph_matrix): In the optimization for windows whose height has changed, use the new window height to compute which rows to invalidate. diff -r 71c6489a2aff -r c867615c6a26 src/dispnew.c --- a/src/dispnew.c Mon Jul 23 10:08:53 2001 +0000 +++ b/src/dispnew.c Mon Jul 23 11:33:42 2001 +0000 @@ -797,14 +797,16 @@ && 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;