changeset 43571:d3b03dea29d4

(Vminibuf_selected_window): New variable. (struct save_window_data): New member minibuf_selected_window. (Fset_window_configuration): Restore Vminibuf_selected_window. (Fcurrent_window_configuration): Save Vminibuf_selected_window. Set minibuf_scroll_window member to nil if minibuf_level is 0. (compare_window_configurations): Compare minibuf_selected_window.
author Kim F. Storm <storm@cua.dk>
date Tue, 26 Feb 2002 22:50:55 +0000
parents d83b8cb2d62a
children 33baa349c070
files src/window.c
diffstat 1 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Feb 26 21:56:12 2002 +0000
+++ b/src/window.c	Tue Feb 26 22:50:55 2002 +0000
@@ -120,6 +120,11 @@
 
 Lisp_Object minibuf_window;
 
+/* Non-nil means it is the window whose mode line should be
+   shown as the selected window when the minibuffer is selected.  */
+
+Lisp_Object Vminibuf_selected_window;
+
 /* Non-nil means it is the window for C-M-v to scroll
    when the mini-buffer is selected.  */
 
@@ -4793,6 +4798,7 @@
     Lisp_Object current_window;
     Lisp_Object current_buffer;
     Lisp_Object minibuf_scroll_window;
+    Lisp_Object minibuf_selected_window;
     Lisp_Object root_window;
     Lisp_Object focus_frame;
     /* Record the values of window-min-width and window-min-height
@@ -5156,6 +5162,7 @@
   window_min_width = XINT (data->min_width);
 
   Vminibuf_scroll_window = data->minibuf_scroll_window;
+  Vminibuf_selected_window = data->minibuf_selected_window;
 
   return (FRAME_LIVE_P (f) ? Qt : Qnil);
 }
@@ -5365,7 +5372,8 @@
   data->selected_frame = selected_frame;
   data->current_window = FRAME_SELECTED_WINDOW (f);
   XSETBUFFER (data->current_buffer, current_buffer);
-  data->minibuf_scroll_window = Vminibuf_scroll_window;
+  data->minibuf_scroll_window = minibuf_level > 0 ? Vminibuf_scroll_window : Qnil;
+  data->minibuf_selected_window = minibuf_level > 0 ? Vminibuf_selected_window : Qnil;
   data->root_window = FRAME_ROOT_WINDOW (f);
   data->focus_frame = FRAME_FOCUS_FRAME (f);
   XSETINT (data->min_height, window_min_height);
@@ -5649,8 +5657,12 @@
   if (! EQ (d1->current_buffer, d2->current_buffer))
     return 0;
   if (! ignore_positions)
-    if (! EQ (d1->minibuf_scroll_window, d2->minibuf_scroll_window))
-      return 0;
+    {
+      if (! EQ (d1->minibuf_scroll_window, d2->minibuf_scroll_window))
+	return 0;
+      if (! EQ (d1->minibuf_selected_window, d2->minibuf_selected_window))
+	return 0;
+    }
   /* Don't compare the root_window field.
      We don't require the two configurations
      to use the same window object,