From: Richard M. Stallman Date: Fri, 5 Jan 1996 02:42:32 +0000 (+0000) Subject: (replace_buffer_in_all_windows): Only re-select old X-Git-Tag: emacs-19.34~1833 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7b9af7a02a1dd1401e9a5bdab831a640581a76c7;p=emacs.git (replace_buffer_in_all_windows): Only re-select old window if it is still live. --- diff --git a/src/window.c b/src/window.c index c665a0c7c66..099730f05c5 100644 --- a/src/window.c +++ b/src/window.c @@ -1649,7 +1649,8 @@ replace_buffer_in_all_windows (buffer) window_loop (UNSHOW_BUFFER, buffer, 0, frame); } - Fselect_window (old_selected); + if (!NILP (Fwindow_live_p (old_selected))) + Fselect_window (old_selected); #else window_loop (UNSHOW_BUFFER, buffer, 0, Qt); #endif