diff --git a/README.rst b/README.rst index 22d0da1..9006044 100644 --- a/README.rst +++ b/README.rst @@ -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 ~~~~~~~ diff --git a/tabbedalt b/tabbedalt index 8413be9..c6c1f7c 100644 --- a/tabbedalt +++ b/tabbedalt @@ -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");