From 2eaeea1f815b5e6c75947e9373c1b2f8fc539344 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Fri, 24 Mar 2023 15:38:03 -0500 Subject: [PATCH] ; tab-bar-new-tab inhibit side-window checks ; Previously, calling tab-bar-new-tab-to only removes the 'window-side ; property on the currently selected window, and then a call to ; delete-other-windows was made to ensure that the selected window was ; the only window. We can skip this check by shadowing ; window--sides-inhibit-check to t. * lisp/tab-bar.el (tab-bar-new-tab-to): inhibit side-window checks Copyright-paperwork-exempt: yes --- lisp/tab-bar.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index dce6fa735fc..c7983146bf9 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1552,15 +1552,14 @@ tab-bar-new-tab-to ;; Handle the case when it's called in the active minibuffer. (when (minibuffer-selected-window) (select-window (minibuffer-selected-window))) - ;; Remove window parameters that can cause problems - ;; with `delete-other-windows' and `split-window'. - (unless (eq tab-bar-new-tab-choice 'clone) - (set-window-parameter nil 'window-atom nil) - (set-window-parameter nil 'window-side nil)) - (let ((ignore-window-parameters t)) + (let ((ignore-window-parameters t) + (window--sides-inhibit-check t)) (if (eq tab-bar-new-tab-choice 'clone) ;; Create new unique windows with the same layout (window-state-put (window-state-get)) + ;; Remove window parameters that can cause problems + ;; with `delete-other-windows' and `split-window'. + (set-window-parameter nil 'window-atom nil) (delete-other-windows) (if (eq tab-bar-new-tab-choice 'window) ;; Create new unique window from remaining window -- 2.40.0