*** empty log message ***
authorroot <root>
Fri, 8 Feb 2008 13:17:59 +0000 (13:17 +0000)
committerroot <root>
Fri, 8 Feb 2008 13:17:59 +0000 (13:17 +0000)
Changes
src/perl/tabbed

diff --git a/Changes b/Changes
index 4de31b5b0585f4df471fb72f77aac55f9901016c..94d05a82be4ff2a9cc55ae930e89607c10f62503 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,6 +19,8 @@ DUMB: support tex fonts
 
 TODO: bgPixmap.apply all to do in scr_recolour?
 
+       - made tabs moveable (based on a patch by Petr Machata).
+       
 9.02 Tue Jan 29 11:58:36 CET 2008
        - the "exg makes everybody happy" release.
        - fix build with !xft.
index 8a479e82d4148c86a42c181e74acc357442fd716..aeefb9089a54b75e5847101dbecd977947fbc5d9 100644 (file)
@@ -325,6 +325,19 @@ sub tab_key_press {
          return 1;
       }
    }
+   elsif ($event->{state} & urxvt::ControlMask) {
+      if ($keysym == 0xff51 || $keysym == 0xff53) {
+         my ($idx1) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };
+         my  $idx2  = ($idx1 + ($keysym == 0xff51 ? -1 : +1)) % @{ $self->{tabs} };
+
+         ($self->{tabs}[$idx1], $self->{tabs}[$idx2]) =
+            ($self->{tabs}[$idx2], $self->{tabs}[$idx1]);
+
+         $self->make_current ($self->{tabs}[$idx2]);
+
+         return 1;
+      }
+   }
 
    ()
 }