This fixes a behavior introduced by the fix of Bug#73527 that splits the
main window when the caller asks for splitting the root window.
* lisp/window.el (window--make-major-side-window): Bind
'ignore-window-parameters' to t so 'split-window' won't mess
with the WINDOW argument when it specifies the root window.
(split-window): If 'ignore-window-parameters' is non-nil, don't
try to split the main window instead of the root window.
(cherry picked from commit
310f62a9489b9c00d5e60d2ab16e7dc54afcadb9)
;; window and not make a new parent window unless needed.
(window-combination-resize 'side)
(window-combination-limit nil)
+ (ignore-window-parameters t)
(window (split-window-no-error next-to nil on-side))
(alist (if (assq 'dedicated alist)
alist
;; frame's root window, split the frame's main window instead
;; (Bug#73627).
((and (eq window (frame-root-window frame))
+ (not ignore-window-parameters)
(window-with-parameter 'window-side nil frame))
(throw 'done (split-window (window-main-window frame)
size side pixelwise refer)))