diff options
Diffstat (limited to 'lisp/window.el')
| -rw-r--r-- | lisp/window.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/window.el b/lisp/window.el index 1f7ae726f49..bd0653fe0d4 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -1010,6 +1010,14 @@ and may be called only if no window on SIDE exists yet." | |||
| 1010 | (cons `(dedicated . ,(or display-buffer-mark-dedicated 'side)) | 1010 | (cons `(dedicated . ,(or display-buffer-mark-dedicated 'side)) |
| 1011 | alist)))) | 1011 | alist)))) |
| 1012 | (when window | 1012 | (when window |
| 1013 | ;; Protect the sibling (the main-window group) from recombination. | ||
| 1014 | ;; Without this, deleting a side window can flatten the group into | ||
| 1015 | ;; the root, causing subsequent side windows on other sides to be | ||
| 1016 | ;; placed incorrectly (Bug#80665). | ||
| 1017 | (when-let* ((sibling (or (window-prev-sibling window) | ||
| 1018 | (window-next-sibling window))) | ||
| 1019 | ((window-child sibling))) | ||
| 1020 | (set-window-combination-limit sibling t)) | ||
| 1013 | ;; Initialize `window-side' parameter of new window to SIDE and | 1021 | ;; Initialize `window-side' parameter of new window to SIDE and |
| 1014 | ;; make that parameter persistent. | 1022 | ;; make that parameter persistent. |
| 1015 | (set-window-parameter window 'window-side side) | 1023 | (set-window-parameter window 'window-side side) |