emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Address issue with tab-bar


From: James N V Cash
Subject: [PATCH] Address issue with tab-bar
Date: Thu, 17 Sep 2020 11:33:29 -0400

I've noticed an issue where, if tab-bar-mode is t, but tab-bar-show is
1, then if you open a second tab, then close it, it will hide the tab
bar and not show it again.

e.g. running the following code will result in two tabs being open, but
the tab bar not visible.

(customize-set-variable 'tab-bar-show 1)
(tab-bar-mode)
(tab-bar-new-tab)
(tab-bar-close-tab)
(tab-bar-new-tab)

The below patch addresses this issue by not hiding the tab bar if
tab-bar-mode is t, in the same way that tab-bar-new-tab-to does.

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index d8f932e7a4..34a9188d85 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -940,7 +940,8 @@ tab-bar-close-tab
                 tab-bar-closed-tabs)
           (set-frame-parameter nil 'tabs (delq close-tab tabs)))
 
-        (when (and (not (zerop (frame-parameter nil 'tab-bar-lines)))
+        (when (and (not tab-bar-mode)
+                   (not (zerop (frame-parameter nil 'tab-bar-lines)))
                    (natnump tab-bar-show)
                    (<= (length (funcall tab-bar-tabs-function))
                        tab-bar-show))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]