changeset 15001:c74ce6421d04

(make_frame_without_minibuffer): Don't change the mini_window's buffer if it already displays a minibuffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 Apr 1996 06:07:06 +0000
parents 90dc2b5d32c4
children 0588af7eae96
files src/frame.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Fri Apr 12 06:06:34 1996 +0000
+++ b/src/frame.c	Fri Apr 12 06:07:06 1996 +0000
@@ -404,12 +404,16 @@
 	}
       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;
 }