unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Address issue with tab-bar
@ 2020-09-17 15:33 James N V Cash
  2020-09-17 19:07 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: James N V Cash @ 2020-09-17 15:33 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix tab bar hiding --]
[-- Type: text/x-diff, Size: 599 bytes --]

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))

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-18  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-17 15:33 [PATCH] Address issue with tab-bar James N V Cash
2020-09-17 19:07 ` Juri Linkov
2020-09-17 20:12   ` James N. V. Cash
2020-09-18  8:29     ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).