repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 8ae6ea607b236b5c9dd437bf6434d7981d05c5ae:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 8ae6ea607b236b5c9dd437bf6434d7981d05c5ae
Author: Marc Lehmann 
Date:   Fri Feb 8 13:18:02 2008 +0000

    *** empty log message ***

diff --git a/Changes b/Changes
index 4de31b5b0585f4df471fb72f77aac55f9901016c..
index ..94d05a82be4ff2a9cc55ae930e89607c10f62503 100644
--- 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.
diff --git a/src/perl/tabbed b/src/perl/tabbed
index 8a479e82d4148c86a42c181e74acc357442fd716..
index ..aeefb9089a54b75e5847101dbecd977947fbc5d9 100644
--- a/src/perl/tabbed
+++ b/src/perl/tabbed
@@ -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;
+      }
+   }

    ()
 }

-----END OF PAGE-----