From a2812a262f4c634f4da947643d00ade971a11a97 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 12 Apr 1996 06:07:06 +0000 Subject: [PATCH] (make_frame_without_minibuffer): Don't change the mini_window's buffer if it already displays a minibuffer. --- src/frame.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/frame.c b/src/frame.c index 846c142248e..d9656c37fad 100644 --- a/src/frame.c +++ b/src/frame.c @@ -404,12 +404,16 @@ make_frame_without_minibuffer (mini_window, kb, display) } mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; } - /* Install the chosen minibuffer window, with proper buffer. */ + f->minibuffer_window = mini_window; - Fset_window_buffer (mini_window, - (NILP (Vminibuffer_list) - ? get_minibuffer (0) - : Fcar (Vminibuffer_list))); + + /* Make the chosen minibuffer window display the proper minibuffer, + unless it is already showing a minibuffer. */ + if (NILP (Fmemq (XWINDOW (mini_window)->buffer, Vminibuffer_list))) + Fset_window_buffer (mini_window, + (NILP (Vminibuffer_list) + ? get_minibuffer (0) + : Fcar (Vminibuffer_list))); return f; } -- 2.39.2