mirror of
https://github.com/gryf/tabbedalt.git
synced 2026-10-06 09:20:35 +02:00
Hide tab even if there is "new" button.
It doesn't make sense to distinguish between state when there is only one tab with "new" button visible or not. Let's keep it simple.
This commit is contained in:
1 parent
7d10c9f4f5
commit
b0e86d5370
2 files changed
+5
-11
No files matched your search
+2
-6
@@ -130,15 +130,11 @@ space::
|
||||
Autohide
|
||||
~~~~~~~~
|
||||
|
||||
To hide tab bar, when there is a single tab, the following resource need to be
|
||||
set to true::
|
||||
By default tab bar would be visible even with only one tab. To hide tab bar,
|
||||
when there is a single tab, the following resource need to be set to true::
|
||||
|
||||
URxvt.tabbedalt.autohide: true
|
||||
|
||||
By default tab bar would be visible even with only one tab. Note, that it will
|
||||
be visible regardless of this option, when ``new-button`` is set. So to make
|
||||
that option work, you'll need to also disable new-button.
|
||||
|
||||
Actions
|
||||
~~~~~~~
|
||||
|
||||
|
||||
@@ -245,14 +245,14 @@ sub refresh {
|
||||
my ($self) = @_;
|
||||
my $tabs_no = (@{$self->{tabs}});
|
||||
|
||||
if (! $self->{new_button} && $self->{autohide} && $tabs_no == 1 &&
|
||||
if ($self->{autohide} && $tabs_no == 1 &&
|
||||
! $self->{cur}->{is_being_renamed}) {
|
||||
$self->{tabheight} = 0;
|
||||
$self->configure;
|
||||
$self->copy_properties;
|
||||
return;
|
||||
} else {
|
||||
$self->{tabheight} = $self->{_tab_height_if_visible};
|
||||
$self->{tabheight} = $self->{_tabheight};
|
||||
$self->configure;
|
||||
$self->copy_properties;
|
||||
}
|
||||
@@ -564,9 +564,7 @@ sub init {
|
||||
_on start => sub {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->{_tab_height_if_visible} = $self->int_bwidth + $self->fheight +
|
||||
$self->lineSpace;
|
||||
$self->{tabheight} = $self->{autohide}? 0 : $self->{_tab_height_if_visible};
|
||||
$self->{_tabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace;
|
||||
|
||||
$self->cmd_parse ("\033[?25l");
|
||||
|
||||
|
||||
Reference in new issue
Block a user