From 9397335a4dad306dad4fce55c1b51e6a7a43f281 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 20 Jan 2006 16:18:07 +0000 Subject: [PATCH] *** empty log message *** --- src/perl/tabbed | 24 ++++++++++++++---------- src/urxvt.pm | 5 +++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/perl/tabbed b/src/perl/tabbed index 70cec3a5..7af6ec21 100644 --- a/src/perl/tabbed +++ b/src/perl/tabbed @@ -111,8 +111,8 @@ sub make_current { $self->configure; $tab->focus_in; $tab->XMapWindow ($tab->parent); - $self->refresh; delete $tab->{activity}; + $self->refresh; () } @@ -218,17 +218,21 @@ sub tab_destroy { sub tab_key_press { my ($self, $tab, $event, $keysym, $str) = @_; - if ($event->{state} & urxvt::ShiftMask - && ($keysym == 0xff51 || $keysym == 0xff53)) { - my ($idx) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} }; + if ($event->{state} & urxvt::ShiftMask) { + if ($keysym == 0xff51 || $keysym == 0xff53) { + my ($idx) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} }; - --$idx if $keysym == 0xff51; - ++$idx if $keysym == 0xff53; + --$idx if $keysym == 0xff51; + ++$idx if $keysym == 0xff53; - $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]); - $self->refresh; - - return 1; + $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]); + + return 1; + } elsif ($keysym == 0xff54) { + $self->new_tab; + + return 1; + } } () diff --git a/src/urxvt.pm b/src/urxvt.pm index 9334c44c..94b349c6 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -171,8 +171,9 @@ is, it implements what is commonly refered to as "tabbed terminal". The topmost displays a "[NEW]" button, which, when clicked, will add a new tab, followed by one button per tab. -Clicking a button will activate that tab. Pressing Shift-Left and -Shift-Right will switch to the tab left or right of the current one. +Clicking a button will activate that tab. Pressing B and +B will switch to the tab left or right of the current one, +while B creates a new tab. =item mark-urls -- 2.34.1