Fix bug #8020 with quick resizing of the selected frame.
xdisp.c (redisplay_internal): Resynchronize `w' if the selected window is changed inside calls to do_pending_window_change.
This commit is contained in:
parent
165bc5a066
commit
a73d395bd9
2 changed files with 25 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-02-13 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (redisplay_internal): Resynchronize `w' if the selected
|
||||
window is changed inside calls to do_pending_window_change.
|
||||
(Bug#8020)
|
||||
|
||||
2011-02-12 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* terminal.c (create_terminal): Use default-keyboard-coding-system
|
||||
|
|
21
src/xdisp.c
21
src/xdisp.c
|
@ -11261,6 +11261,7 @@ redisplay_internal (preserve_echo_area)
|
|||
int preserve_echo_area;
|
||||
{
|
||||
struct window *w = XWINDOW (selected_window);
|
||||
struct window *sw;
|
||||
struct frame *f;
|
||||
int pause;
|
||||
int must_finish = 0;
|
||||
|
@ -11331,6 +11332,9 @@ redisplay_internal (preserve_echo_area)
|
|||
}
|
||||
|
||||
retry:
|
||||
/* Remember the currently selected window. */
|
||||
sw = w;
|
||||
|
||||
if (!EQ (old_frame, selected_frame)
|
||||
&& FRAME_LIVE_P (XFRAME (old_frame)))
|
||||
/* When running redisplay, we play a bit fast-and-loose and allow e.g.
|
||||
|
@ -11396,6 +11400,14 @@ redisplay_internal (preserve_echo_area)
|
|||
/* Notice any pending interrupt request to change frame size. */
|
||||
do_pending_window_change (1);
|
||||
|
||||
/* do_pending_window_change could change the selected_window due to
|
||||
frame resizing which makes the selected window too small. */
|
||||
if (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)
|
||||
{
|
||||
sw = w;
|
||||
reconsider_clip_changes (w, current_buffer);
|
||||
}
|
||||
|
||||
/* Clear frames marked as garbaged. */
|
||||
if (frame_garbaged)
|
||||
clear_garbaged_frames ();
|
||||
|
@ -11665,6 +11677,10 @@ redisplay_internal (preserve_echo_area)
|
|||
if (!must_finish)
|
||||
{
|
||||
do_pending_window_change (1);
|
||||
/* If selected_window changed, redisplay again. */
|
||||
if (WINDOWP (selected_window)
|
||||
&& (w = XWINDOW (selected_window)) != sw)
|
||||
goto retry;
|
||||
|
||||
/* We used to always goto end_of_redisplay here, but this
|
||||
isn't enough if we have a blinking cursor. */
|
||||
|
@ -11959,8 +11975,9 @@ redisplay_internal (preserve_echo_area)
|
|||
do_pending_window_change (1);
|
||||
|
||||
/* If we just did a pending size change, or have additional
|
||||
visible frames, redisplay again. */
|
||||
if (windows_or_buffers_changed && !pause)
|
||||
visible frames, or selected_window changed, redisplay again. */
|
||||
if ((windows_or_buffers_changed && !pause)
|
||||
|| (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw))
|
||||
goto retry;
|
||||
|
||||
/* Clear the face cache eventually. */
|
||||
|
|
Loading…
Add table
Reference in a new issue