On Wed, 3 Feb 2010, Bertrand Yvain wrote:

> On Wed, Feb 03, 2010 at 11:31:32AM +0100, Tassilo Horn wrote:
> > I tried to do it on my own (bind Shift-Up (0xff52 according to xev) 
> > to delete the current tab), but I failed cause I don't know perl at 
> > all.  Nothing happens when pressing Shift-Up.
> 
> I posted this patch a few months ago:
> 
> --- /usr/lib/urxvt/perl/tabbed  2009-08-11 18:15:22.000000000 +0200
> +++ /tmp/tabbed 2009-08-11 18:15:13.000000000 +0200
> @@ -316,6 +316,10 @@
>           $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);
> 
>           return 1;
> +      } elsif ($keysym == 0xff52) {
> +         $tab->destroy;
> +
> +         return 1;
>        } elsif ($keysym == 0xff54) {
>           $self->new_tab;
> 
> 
> Also in the mailing-list archive at
> http://lists.schmorp.de/pipermail/rxvt-unicode/2009q3/001053.html
> 

For anyone following along and wondering why Tassilo's patch didn't 
work...  My first thought was that if the first patch didn't work, this 
one wouldn't either.  (It merely swaps the order of the elsif's for 
0xff52 and 0xff54)

But, on closer inspection, the difference is:

# Bertrand's working patch uses the tab passed into the function
+          $tab->destroy;

# Tassilo's non-working patch
+          $self->tab_destroy;

tab_destroy needs a 'tab' argument.  So:

+          $self->tab_destroy($tab);

would probably work, but Bertrand simply used it directly.

-- 
Best,
Ben

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to