]> git.eshelyaron.com Git - emacs.git/commitdiff
(adjust_glyph_matrix): In the optimization for
authorGerd Moellmann <gerd@gnu.org>
Mon, 23 Jul 2001 11:33:58 +0000 (11:33 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 23 Jul 2001 11:33:58 +0000 (11:33 +0000)
windows whose height has changed, use the new window height
to compute which rows to invalidate.

src/ChangeLog
src/dispnew.c

index 1e6c0d1cbf22b6c8c27bdebd28d47eaba17e86af..790b79e07cdb75663aac849b308ec3fab0ed33ef 100644 (file)
@@ -1,5 +1,9 @@
 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.
index 452bd64c12eba651c64793b6ffa9f513033644ab..afef7909a809e7c0460463e791b4033907c8f699 100644 (file)
@@ -797,14 +797,16 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
              && 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;