*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 16:18:07 +0000 (16:18 +0000)
committerroot <root>
Fri, 20 Jan 2006 16:18:07 +0000 (16:18 +0000)
src/perl/tabbed
src/urxvt.pm

index 70cec3a5222385d5f4f9d1fe5c4fc90035753a6b..7af6ec212e3c3bf41386105a43eb18c8ac8a573d 100644 (file)
@@ -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;
+      }
    }
 
    ()
index 9334c44c19defc3e70a62f049e3f41be808650eb..94b349c6ff93a3a07a475beea75dcd25fa5d92db 100644 (file)
@@ -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<Shift-Left> and
+B<Shift-Right> will switch to the tab left or right of the current one,
+while B<Shift-Down> creates a new tab.
 
 =item mark-urls