all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: James N V Cash <james.cash@occasionallycogent.com>
To: emacs-devel@gnu.org
Subject: [PATCH] Address issue with tab-bar
Date: Thu, 17 Sep 2020 11:33:29 -0400	[thread overview]
Message-ID: <87o8m4o1ti.fsf@gmail.com> (raw)

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

             reply	other threads:[~2020-09-17 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 15:33 James N V Cash [this message]
2020-09-17 19:07 ` [PATCH] Address issue with tab-bar Juri Linkov
2020-09-17 20:12   ` James N. V. Cash
2020-09-18  8:29     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8m4o1ti.fsf@gmail.com \
    --to=james.cash@occasionallycogent.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.