changeset 93258:16142d1d9f33

(redisplay_internal): Reset selected_frame earlier.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 26 Mar 2008 18:11:47 +0000
parents cc31ce92f833
children 889781860700
files src/ChangeLog src/xdisp.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Mar 26 18:10:51 2008 +0000
+++ b/src/ChangeLog	Wed Mar 26 18:11:47 2008 +0000
@@ -1,5 +1,7 @@
 2008-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* xdisp.c (redisplay_internal): Reset selected_frame earlier.
+
 	* indent.c (scan_for_column): Extract from current_column_1.
 	Merge with the same code from Fmove_to_column.
 	(current_column_1, Fmove_to_column): Use it.
--- a/src/xdisp.c	Wed Mar 26 18:10:51 2008 +0000
+++ b/src/xdisp.c	Wed Mar 26 18:11:47 2008 +0000
@@ -11636,6 +11636,14 @@
 	    }
 	}
 
+      if (!EQ (old_frame, selected_frame)
+	  && FRAME_LIVE_P (XFRAME (old_frame)))
+	/* We played a bit fast-and-loose above and allowed selected_frame
+	   and selected_window to be temporarily out-of-sync but let's make
+	   sure this stays contained.  */
+	select_frame_for_redisplay (old_frame);
+      eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window));
+
       if (!pause)
 	{
 	  /* Do the mark_window_display_accurate after all windows have