From bf6b4d583b9cd1b1fd0035bfb9028c0eba230c66 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 26 Mar 2008 18:11:47 +0000 Subject: [PATCH] (redisplay_internal): Reset selected_frame earlier. --- src/ChangeLog | 2 ++ src/xdisp.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3dd9051e454..a246449bfb7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-03-26 Stefan Monnier + * 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. diff --git a/src/xdisp.c b/src/xdisp.c index d075d34bb1f..70db580bb0d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11636,6 +11636,14 @@ redisplay_internal (preserve_echo_area) } } + 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 -- 2.11.4.GIT