diff --git a/lisp/window.el b/lisp/window.el index 006cfa19525..254814b989a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5455,6 +5455,13 @@ split-window (setq atom-root (window-atom-root window)) (not (eq atom-root window))) (throw 'done (split-window atom-root size side pixelwise))) + ;; If WINDOW's frame has a side window and WINDOW specifies the + ;; frame's root window, split the frame's main window instead + ;; (Bug#73627). + ((and (eq window (frame-root-window frame)) + (window-with-parameter 'window-side nil frame)) + (throw 'done (split-window (window-main-window frame) + size side pixelwise))) ;; If WINDOW is a side window or its first or last child is a ;; side window, throw an error unless `window-combination-resize' ;; equals 'side.