[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs
From: |
Juri Linkov |
Subject: |
bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs |
Date: |
Mon, 17 Jun 2024 09:16:44 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> + ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame))
>> 1))
>> + 'tab)
>>
>> How would users get back the old behavior? By customizing
>> 'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'?
>
> This patch just copies the logic of frame handling to tab handling.
> There is no customization for frame handling, so there is
> no customization for tab handling.
>
> In window-deletable-p there is hard-coded 'frame-root-window-p'
> that checks if the frame has only 1 window. So the patch
> does the same by checking if there is only 1 tab on the frame.
>
> Also in window--delete the call of 'tab-bar-close-tab'
> corresponds to the call 'delete-frame'.
Please see a more correct patch:
diff --git a/lisp/window.el b/lisp/window.el
index cf5c07395ab..588014b8f77 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4138,7 +4138,9 @@ window-deletable-p
(not (eq (default-toplevel-value
'minibuffer-follows-selected-frame)
t)))))
- 'frame))
+ (if (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame))
1))
+ 'tab
+ 'frame)))
((window-minibuffer-p window)
;; If WINDOW is the minibuffer window of a non-minibuffer-only
;; frame, it cannot be deleted separately.
@@ -4979,6 +4981,9 @@ window--delete
(unless (and dedicated-only (not (window-dedicated-p window)))
(let ((deletable (window-deletable-p window)))
(cond
+ ((eq deletable 'tab)
+ (tab-bar-close-tab)
+ 'tab)
((eq deletable 'frame)
(let ((frame (window-frame window)))
(cond
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, (continued)
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Juri Linkov, 2024/06/13
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, martin rudalics, 2024/06/13
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Juri Linkov, 2024/06/14
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Juri Linkov, 2024/06/14
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, martin rudalics, 2024/06/15
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Juri Linkov, 2024/06/16
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, martin rudalics, 2024/06/16
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Al Haji-Ali, 2024/06/16
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, martin rudalics, 2024/06/17
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Juri Linkov, 2024/06/16
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs,
Juri Linkov <=
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, martin rudalics, 2024/06/17
- bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs, Eli Zaretskii, 2024/06/07