From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James N V Cash Newsgroups: gmane.emacs.devel Subject: [PATCH] Address issue with tab-bar Date: Thu, 17 Sep 2020 11:33:29 -0400 Message-ID: <87o8m4o1ti.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31097"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 17 17:54:19 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIwEk-0007yD-FH for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 17:54:18 +0200 Original-Received: from localhost ([::1]:47860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIwEj-0008PS-H6 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 11:54:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIvug-0006GH-8G for emacs-devel@gnu.org; Thu, 17 Sep 2020 11:33:34 -0400 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:45330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIvue-0007PZ-Ks for emacs-devel@gnu.org; Thu, 17 Sep 2020 11:33:33 -0400 Original-Received: by mail-qt1-x82e.google.com with SMTP id z2so2154849qtv.12 for ; Thu, 17 Sep 2020 08:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version; bh=OAk10DIzNEdm+Rx6BTFjEnPHoj5N3HVSOuOWwqhXwrM=; b=hxHSNJ5apD3CvIFNTHisp8YmxXVFDlcgXbkQOqkN2oRu0GJgspsTFERPbJbJzneEWs 2ekDf2gvfuohhYUZcR+fjAE/wXyVQUuq2JkZpO6GFEEjDf+wr+znfrDb47o+AE8kjxn8 I7spvqSgZdrq1iWgG6vuMP59kSKV+y7vOIvR8INx0CNuj9w/xfHwpod6s31LPloXrYv4 7/RbrXdvk6IsKcrH92l3tZfQefPUKB0B2S/elIbcEFwel0TFeaziBqWubSn6LP0Rycgk qqIBNw5gkq3yH5zuEaPMwdCXxoMmbQiCoM/bnSnFV90MycEhJ+vIgErk5g3BzDqFTxN7 h1MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version; bh=OAk10DIzNEdm+Rx6BTFjEnPHoj5N3HVSOuOWwqhXwrM=; b=udhgs7goYWGdqSNu6HIZsa0hZcKDUtjw7xZlRm5NluJ6ktynEfI9ANKB+nQtw8Eitg aSt0z0lL7KRHuMiCGUrjWgTAQnbIbfkvi+a4nkfaeYxa8+rMW6icNwWgcLOavHUEw9Zm ypt/3hcgLj3xgCtMusAfNAPqBBp9Dw1XVkAfS5sM2vMHcYmrPyomavBtiTVrOOVw71tB Ilso94SW8Unk17m0s1Jdl+HCEU8JmdG+olzIhA+nGTxllyWlIzVJhME0+bOPm2kK3pwF eTjtDRJq266gPW60Mp754ohf8O+wpprfT9x7Q6Dy/4VKJiciryo/qo6WvxXn3oesfTVi gw8w== X-Gm-Message-State: AOAM530n81IccoOcehGqSOH1gnMA6Z3MYWIO6ykLJOyS9wyhbbMj3lfT X4eSVd+7w6RCWtlNfhTgpFiO/0fKpoRsog== X-Google-Smtp-Source: ABdhPJwzcr6Vs5RAcrVGXZfSwpm3rzJfqWL3kBG5/8/320vhETZ31ZV0yxBIkIAJ3F4vB2EwsN+LXA== X-Received: by 2002:ac8:f04:: with SMTP id e4mr15656817qtk.342.1600356810883; Thu, 17 Sep 2020 08:33:30 -0700 (PDT) Original-Received: from gonk ([2607:f2c0:e360:1126:3828:532d:3761:fe34]) by smtp.gmail.com with ESMTPSA id l19sm33893qtu.16.2020.09.17.08.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 08:33:30 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=james.nvc@gmail.com; helo=mail-qt1-x82e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 17 Sep 2020 11:52:52 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256015 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tab-bar-fix-close.patch Content-Description: fix tab bar hiding 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)) --=-=-=--