From 06495c96ae0f5a0fa1d56f47750624138f80cb94 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 29 Mar 2016 20:38:54 +0300 Subject: [PATCH] Fix rare problems with echo-area display and multiple frames * src/xdisp.c (redisplay_window): Bind inhibit-redisplay non-nil around the call to x_consider_frame_title, to prevent resize_mini_window from undoing echo-area display. (Bug#23124) --- src/xdisp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index d701306b22c..5be94f0cd07 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17082,7 +17082,16 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) ignore_mouse_drag_p = true; #endif } + ptrdiff_t count1 = SPECPDL_INDEX (); + /* x_consider_frame_title calls select-frame, which calls + resize_mini_window, which could resize the mini-window and by + that undo the effect of this redisplay cycle wrt minibuffer + and echo-area display. Binding inhibit-redisplay to t makes + the call to resize_mini_window a no-op, thus avoiding the + adverse side effects. */ + specbind (Qinhibit_redisplay, Qt); x_consider_frame_title (w->frame); + unbind_to (count1, Qnil); #endif } -- 2.39.2