diff options
| author | Martin Rudalics | 2020-11-07 09:20:14 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2020-11-07 09:20:14 +0100 |
| commit | f4acd7a924fbb6400130e5091ea37e50e2d0fac2 (patch) | |
| tree | 6deb2b8cd866d99c47281b99ea76d00ad2734f1c | |
| parent | 0cdd6c9218f7df5793155e86d2028288b9b38bd1 (diff) | |
| download | emacs-f4acd7a924fbb6400130e5091ea37e50e2d0fac2.tar.gz emacs-f4acd7a924fbb6400130e5091ea37e50e2d0fac2.zip | |
Split windows evenly when 'min-margins' parameter was set (Bug#44483)
* lisp/window.el (split-window): Make new window inherit any
'min-margins' parameter from WINDOW so that horizontal splits
reliably produce windows of same width (Bug#44483).
| -rw-r--r-- | lisp/window.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el index 48005fc93e0..ba56dedf046 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -5412,7 +5412,13 @@ frame. The selected window is not changed by this function." | |||
| 5412 | (set-window-parameter (window-parent new) 'window-atom t)) | 5412 | (set-window-parameter (window-parent new) 'window-atom t)) |
| 5413 | (set-window-parameter new 'window-atom t))) | 5413 | (set-window-parameter new 'window-atom t))) |
| 5414 | 5414 | ||
| 5415 | ;; Sanitize sizes unless SIZE was specified. | 5415 | ;; Make the new window inherit the `min-margins' parameter of |
| 5416 | ;; WINDOW (Bug#44483). | ||
| 5417 | (let ((min-margins (window-parameter window 'min-margins))) | ||
| 5418 | (when min-margins | ||
| 5419 | (set-window-parameter new 'min-margins min-margins))) | ||
| 5420 | |||
| 5421 | ;; Sanitize sizes unless SIZE was specified. | ||
| 5416 | (unless size | 5422 | (unless size |
| 5417 | (window--sanitize-window-sizes horizontal)) | 5423 | (window--sanitize-window-sizes horizontal)) |
| 5418 | 5424 | ||