Perl tabbedex: Ctrl+Shift+D destroys the tab.

This commit is contained in:
Kolan Sh 2013-02-21 17:39:05 +04:00
parent be7b3fdd49
commit 7830a3fbae
1 changed files with 13 additions and 6 deletions

View File

@ -502,7 +502,7 @@ sub tab_key_press {
}
# next tab
if ($keysym == 0x004b || $keysym == 0x006b) {
elsif ($keysym == 0x004b || $keysym == 0x006b) {
if (@{ $self->{tabs} } > 1) {
$self->change_tab($tab, 1);
}
@ -511,7 +511,7 @@ sub tab_key_press {
# new tab
if ($keysym == 0x003b) {
elsif ($keysym == 0x003b) {
$self->new_tab;
return 1;
@ -527,7 +527,7 @@ sub tab_key_press {
}
# move tab left
if ($keysym == 0x0048 || $keysym == 0x0068) {
elsif ($keysym == 0x0048 || $keysym == 0x0068) {
if (@{ $self->{tabs} } > 1) {
my $idx1 = 0;
++$idx1 while $self->{tabs}[$idx1] != $tab;
@ -541,7 +541,7 @@ sub tab_key_press {
}
# move tab right
if ($keysym == 0x0047 || $keysym == 0x0067) {
elsif ($keysym == 0x0047 || $keysym == 0x0067) {
if (@{ $self->{tabs} } > 1) {
my $idx1 = 0;
++$idx1 while $self->{tabs}[$idx1] != $tab;
@ -553,6 +553,13 @@ sub tab_key_press {
}
return 1;
}
# kill tab
elsif ($keysym == 0x0044) {
$tab->destroy;
return 1;
}
}
();