Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ruN a/src/command.C b/src/command.C
- --- a/src/command.C 2013-04-03 20:51:44.467076894 +0900
- +++ b/src/command.C 2013-04-03 20:52:00.730410475 +0900
- @@ -522,7 +522,7 @@
- }
- }
- #ifdef SCROLL_ON_UPDOWN_KEYS
- - if (IS_SCROLL_MOD)
- + if (IS_SCROLL_MOD && !ctrl)
- {
- if (keysym == XK_Up)
- {
- diff -ruN a/src/feature.h b/src/feature.h
- --- a/src/feature.h 2013-04-03 20:51:44.467076894 +0900
- +++ b/src/feature.h 2013-04-03 21:00:02.733751171 +0900
- @@ -117,7 +117,7 @@
- * SCROLL_ON_* defines above.).
- * Also for modifier+Home/End keys to move to top/bottom
- */
- -/* #define SCROLL_ON_UPDOWN_KEYS */
- +#define SCROLL_ON_UPDOWN_KEYS
- /* #define SCROLL_ON_HOMEEND_KEYS */
- /*
- diff -ruN a/src/perl/tabbed b/src/perl/tabbed
- --- a/src/perl/tabbed 2013-04-03 20:51:44.460410226 +0900
- +++ b/src/perl/tabbed 2013-04-03 20:54:48.527079704 +0900
- @@ -348,31 +348,32 @@
- sub tab_key_press {
- my ($self, $tab, $event, $keysym, $str) = @_;
- - 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;
- + if (($keysym == 0xff54) &&
- + (($event->{state} & urxvt::ControlMask) ||
- + ($event->{state} & urxvt::ShiftMask)))
- + {
- + $self->new_tab;
- + 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->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);
- + ($self->{tabs}[$idx1], $self->{tabs}[$idx2]) =
- + ($self->{tabs}[$idx2], $self->{tabs}[$idx1]);
- - return 1;
- - } elsif ($keysym == 0xff54) {
- - $self->new_tab;
- + $self->make_current ($self->{tabs}[$idx2]);
- return 1;
- }
- - }
- - elsif ($event->{state} & urxvt::ControlMask) {
- + } elsif ($event->{state} & urxvt::ShiftMask) {
- if ($keysym == 0xff51 || $keysym == 0xff53) {
- - my ($idx1) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };
- - my $idx2 = ($idx1 + ($keysym == 0xff51 ? -1 : +1)) % @{ $self->{tabs} };
- + my ($idx) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };
- - ($self->{tabs}[$idx1], $self->{tabs}[$idx2]) =
- - ($self->{tabs}[$idx2], $self->{tabs}[$idx1]);
- + --$idx if $keysym == 0xff51;
- + ++$idx if $keysym == 0xff53;
- - $self->make_current ($self->{tabs}[$idx2]);
- + $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment