mirror of
https://github.com/gryf/tabbedalt.git
synced 2025-12-17 19:40:31 +01: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:
@@ -130,15 +130,11 @@ space::
|
|||||||
Autohide
|
Autohide
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
To hide tab bar, when there is a single tab, the following resource need to be
|
By default tab bar would be visible even with only one tab. To hide tab bar,
|
||||||
set to true::
|
when there is a single tab, the following resource need to be set to true::
|
||||||
|
|
||||||
URxvt.tabbedalt.autohide: 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
|
Actions
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -245,14 +245,14 @@ sub refresh {
|
|||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
my $tabs_no = (@{$self->{tabs}});
|
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->{cur}->{is_being_renamed}) {
|
||||||
$self->{tabheight} = 0;
|
$self->{tabheight} = 0;
|
||||||
$self->configure;
|
$self->configure;
|
||||||
$self->copy_properties;
|
$self->copy_properties;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$self->{tabheight} = $self->{_tab_height_if_visible};
|
$self->{tabheight} = $self->{_tabheight};
|
||||||
$self->configure;
|
$self->configure;
|
||||||
$self->copy_properties;
|
$self->copy_properties;
|
||||||
}
|
}
|
||||||
@@ -564,9 +564,7 @@ sub init {
|
|||||||
_on start => sub {
|
_on start => sub {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
$self->{_tab_height_if_visible} = $self->int_bwidth + $self->fheight +
|
$self->{_tabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace;
|
||||||
$self->lineSpace;
|
|
||||||
$self->{tabheight} = $self->{autohide}? 0 : $self->{_tab_height_if_visible};
|
|
||||||
|
|
||||||
$self->cmd_parse ("\033[?25l");
|
$self->cmd_parse ("\033[?25l");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user