changeset 36265:54f26d21b7a7

(redisplay_internal): Do the mark_window_display_accurate after all windows have been redisplayed because this call resets flags in buffers which are needed for proper redisplay.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 21 Feb 2001 16:19:56 +0000
parents 047e5917fdc8
children 8ba820712df5
files src/xdisp.c
diffstat 1 files changed, 23 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Feb 21 15:54:00 2001 +0000
+++ b/src/xdisp.c	Wed Feb 21 16:19:56 2001 +0000
@@ -8374,6 +8374,9 @@
   if (consider_all_windows_p)
     {
       Lisp_Object tail, frame;
+      int i, n = 0, size = 50;
+      struct frame **updated
+	= (struct frame **) alloca (size * sizeof *updated);
 
       /* Clear the face cache eventually.  */
       if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
@@ -8429,12 +8432,29 @@
 		  if (pause)
 		    break;
 
-		  mark_window_display_accurate (f->root_window, 1);
-		  if (frame_up_to_date_hook)
-		    frame_up_to_date_hook (f);
+		  if (n == size)
+		    {
+		      int nbytes = size * sizeof *updated;
+		      struct frame **p = (struct frame **) alloca (2 * nbytes);
+		      bcopy (updated, p, nbytes);
+		      size *= 2;
+		    }
+		  
+		  updated[n++] = f;
 		}
 	    }
 	}
+
+      /* Do the mark_window_display_accurate after all windows have
+	 been redisplayed because this call resets flags in buffers
+	 which are needed for proper redisplay.  */
+      for (i = 0; i < n; ++i)
+	{
+	  struct frame *f = updated[i];
+	  mark_window_display_accurate (f->root_window, 1);
+	  if (frame_up_to_date_hook)
+	    frame_up_to_date_hook (f);
+	}
     }
   else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
     {