diff options
| author | Benson Chu | 2023-03-24 15:38:03 -0500 |
|---|---|---|
| committer | Eli Zaretskii | 2023-04-24 14:47:14 +0300 |
| commit | 99add09d5e16a4fef752abedc3ee96989f1b9ae2 (patch) | |
| tree | a4c60c25734802f98d0622676bc7a97158798314 /lisp | |
| parent | 087e8181947d3fbe2abf116b0eecab13cb046d63 (diff) | |
| download | emacs-99add09d5e16a4fef752abedc3ee96989f1b9ae2.tar.gz emacs-99add09d5e16a4fef752abedc3ee96989f1b9ae2.zip | |
tab-bar-new-tab: inhibit side-window checks
Previously, calling 'tab-bar-new-tab-to' only removed 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.
(Bug#62427)
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/tab-bar.el | 11 |
1 files 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 @@ After the tab is created, the hooks in | |||
| 1552 | ;; Handle the case when it's called in the active minibuffer. | 1552 | ;; Handle the case when it's called in the active minibuffer. |
| 1553 | (when (minibuffer-selected-window) | 1553 | (when (minibuffer-selected-window) |
| 1554 | (select-window (minibuffer-selected-window))) | 1554 | (select-window (minibuffer-selected-window))) |
| 1555 | ;; Remove window parameters that can cause problems | 1555 | (let ((ignore-window-parameters t) |
| 1556 | ;; with `delete-other-windows' and `split-window'. | 1556 | (window--sides-inhibit-check t)) |
| 1557 | (unless (eq tab-bar-new-tab-choice 'clone) | ||
| 1558 | (set-window-parameter nil 'window-atom nil) | ||
| 1559 | (set-window-parameter nil 'window-side nil)) | ||
| 1560 | (let ((ignore-window-parameters t)) | ||
| 1561 | (if (eq tab-bar-new-tab-choice 'clone) | 1557 | (if (eq tab-bar-new-tab-choice 'clone) |
| 1562 | ;; Create new unique windows with the same layout | 1558 | ;; Create new unique windows with the same layout |
| 1563 | (window-state-put (window-state-get)) | 1559 | (window-state-put (window-state-get)) |
| 1560 | ;; Remove window parameters that can cause problems | ||
| 1561 | ;; with `delete-other-windows' and `split-window'. | ||
| 1562 | (set-window-parameter nil 'window-atom nil) | ||
| 1564 | (delete-other-windows) | 1563 | (delete-other-windows) |
| 1565 | (if (eq tab-bar-new-tab-choice 'window) | 1564 | (if (eq tab-bar-new-tab-choice 'window) |
| 1566 | ;; Create new unique window from remaining window | 1565 | ;; Create new unique window from remaining window |