changeset 43573:3d6e86e8823b

(read_minibuf): Set Vminibuf_selected_window on first entry to minibuffer or on entry from a non-minibuffer window.
author Kim F. Storm <storm@cua.dk>
date Tue, 26 Feb 2002 22:52:56 +0000
parents 33baa349c070
children b14fc05f010f
files src/minibuf.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Tue Feb 26 22:52:07 2002 +0000
+++ b/src/minibuf.c	Tue Feb 26 22:52:56 2002 +0000
@@ -123,11 +123,6 @@
 
 static Lisp_Object last_exact_completion;
 
-/* Non-nil means it is the window for C-M-v to scroll
-   when the minibuffer is selected.  */
-
-extern Lisp_Object Vminibuf_scroll_window;
-
 extern Lisp_Object Voverriding_local_map;
 
 Lisp_Object Quser_variable_p;
@@ -551,6 +546,8 @@
     Fredirect_frame_focus (selected_frame, mini_frame);
 
   Vminibuf_scroll_window = selected_window;
+  if (minibuf_level == 1 || !EQ (minibuf_window, selected_window))
+    Vminibuf_selected_window = selected_window;
   Fset_window_buffer (minibuf_window, Fcurrent_buffer ());
   Fselect_window (minibuf_window);
   XSETFASTINT (XWINDOW (minibuf_window)->hscroll, 0);