]> git.eshelyaron.com Git - emacs.git/commitdiff
Split windows horizontally in places that use split to create a new window.
authorJuri Linkov <juri@linkov.net>
Fri, 19 May 2023 18:04:50 +0000 (21:04 +0300)
committerJuri Linkov <juri@linkov.net>
Fri, 19 May 2023 18:04:50 +0000 (21:04 +0300)
* lisp/tab-bar.el (tab-bar-new-tab-to):
* lisp/window.el (window-state-put):
To create a new window, split horizontally instead of vertically.
Use 'window-safe-min-width' for the SIZE arg of 'split-window'.
(bug#62592)

lisp/tab-bar.el
lisp/window.el

index ab428b816310d0b32d4337704c2d09cc3aec1e53..73f2ff77c50ba896e2b1db47ae7f4ca01e8a45be 100644 (file)
@@ -1568,7 +1568,8 @@ After the tab is created, the hooks in
                 (window-state-put (window-state-get)))
             ;; Create a new window to get rid of old window parameters
             ;; (e.g. prev/next buffers) of old window.
-            (split-window) (delete-window))))
+            (split-window nil window-safe-min-width t)
+            (delete-window))))
 
       (let ((buffer
              (if (and (functionp tab-bar-new-tab-choice)
index 016d53ffbdd5fa64cbb22fb8638061b7d1cb3941..a11b1a51f8fb74bb857ec4686a580944d8a7f141 100644 (file)
@@ -6382,7 +6382,7 @@ windows can get as small as `window-safe-min-height' and
                      (selected-window)))
       (delete-other-windows-internal window root)
       ;; Create a new window to replace the existing one.
-      (setq window (prog1 (split-window window)
+      (setq window (prog1 (split-window window window-safe-min-width t)
                      (delete-window window)))))
 
   (set-window-dedicated-p window nil)