From 3709a15af48c495a99b953c974b836621f246ac5 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Feb 2008 13:17:59 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ src/perl/tabbed | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Changes b/Changes index 4de31b5b..94d05a82 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 8a479e82..aeefb908 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; + } + } () } -- 2.34.1