]> git.eshelyaron.com Git - emacs.git/commitdiff
(replace_buffer_in_all_windows): Only re-select old
authorRichard M. Stallman <rms@gnu.org>
Fri, 5 Jan 1996 02:42:32 +0000 (02:42 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 5 Jan 1996 02:42:32 +0000 (02:42 +0000)
window if it is still live.

src/window.c

index c665a0c7c66e494d6632b342eeafae9c8aa0aae1..099730f05c578534c476f99ac36295ebe5ae629f 100644 (file)
@@ -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