summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-14 18:20:14 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-14 18:20:14 +0000
commita4b925508c8a663e165060cd4b9422429732ec44 (patch)
tree6a34ebac49f869d12a487ad6a20ef6db5b344bdc /src/frame.c
parent3b39c57077d8a37d87fe126c662d2b4b00b75873 (diff)
downloademacs-a4b925508c8a663e165060cd4b9422429732ec44.tar.gz
(Fdelete_frame): If the minibuf window was selected, make that remain so.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 3591ef4f20b..685761dc2c2 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -901,6 +901,7 @@ but if the second optional argument FORCE is non-nil, you may do so.")
Lisp_Object frame, force;
{
struct frame *f;
+ int minibuffer_selected;
if (EQ (frame, Qnil))
{
@@ -940,6 +941,8 @@ but if the second optional argument FORCE is non-nil, you may do so.")
}
}
+ minibuffer_selected = EQ (minibuf_window, selected_window);
+
/* Don't let the frame remain selected. */
if (f == selected_frame)
Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
@@ -950,6 +953,11 @@ but if the second optional argument FORCE is non-nil, you may do so.")
Fset_window_buffer (selected_frame->minibuffer_window,
XWINDOW (minibuf_window)->buffer);
minibuf_window = selected_frame->minibuffer_window;
+
+ /* If the dying minibuffer window was selected,
+ select the new one. */
+ if (minibuffer_selected)
+ Fselect_window (minibuf_window);
}
/* Clear any X selections for this frame. */