diff -u --label /usr/share/emacs/28.0.50/lisp/progmodes/compile.el.gz --label /home/user/src/patches/compile.el.gz /tmp/jka-comekeJLn /tmp/jka-com8N603U --- /usr/share/emacs/28.0.50/lisp/progmodes/compile.el.gz +++ /home/user/src/patches/compile.el.gz @@ -2845,8 +2845,8 @@ (when (and (not pre-existing) w) (compilation-set-window-height w)) - (if from-compilation-buffer - ;; If the compilation buffer window was selected, + (if (or from-compilation-buffer (eq w (selected-window))) + ;; If the compilation buffer window is selected, ;; keep the compilation buffer in this window; ;; display the source in another window. (let ((pop-up-windows t)) Diff finished. Fri Mar 26 17:24:14 2021