*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 15:47:55 +0000 (15:47 +0000)
committerroot <root>
Fri, 20 Jan 2006 15:47:55 +0000 (15:47 +0000)
Changes
MANIFEST
src/perl/tabbed

diff --git a/Changes b/Changes
index c2deec54c4218120ae97facd24c0f447fd1478f3..d68f0c6cc2c9a7aec869967d6f58484c32589a13 100644 (file)
--- a/Changes
+++ b/Changes
@@ -18,6 +18,9 @@ WISH: support tex fonts
 
 7.2
        - removed support for obsolete offix dnd protocol.
+        - added "tabbed" extension that provides a crude tabbed terminal.
+        - fixed the automove-background extension to ignore coordinates
+          in non-synthetic events.
 
 7.1  Thu Jan 19 20:25:34 CET 2006
         - setuid/setgid operation is now _encouraged_: security has been
index a977a1286f90bdbe615cbeddee880c1a89e83073..ad41eb393ca2631e37341b4e138710ebddf31ca6 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -163,6 +163,7 @@ src/perl/selection-pastebin
 src/perl/searchable-scrollback
 src/perl/automove-background
 src/perl/mark-urls
+src/perl/tabbed
 src/perl/example-refresh-hooks
 src/perl/block-graphics-to-ascii
 src/perl/digital-clock
index c646775d1711e4f419b84e244ae9cfd8f4ec2f01..8f09ac6fddb58a3a99ab539e56be607d23e7a231 100644 (file)
@@ -210,13 +210,32 @@ 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} };
+
+      --$idx if $keysym == 0xff51;
+      ++$idx if $keysym == 0xff53;
+
+      $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);
+      $self->refresh;
+      
+      return 1;
+   }
+
+   ()
+}
+
 package urxvt::ext::tabbed::tab;
 
 # helper extension implementing the subwindows of a tabbed terminal.
 # simply proxies all interesting calls back to the tabbed class.
 
 {
-   for my $hook qw(start destroy) {
+   for my $hook qw(start destroy key_press) {
       eval qq{
          sub on_$hook {
             my \$parent = \$_[0]{term}{parent}