--- rxvt-unicode/src/urxvt.pm 2006/01/08 05:52:42 1.56 +++ rxvt-unicode/src/urxvt.pm 2006/01/08 22:58:13 1.58 @@ -473,6 +473,8 @@ . (do { local $/; <$fh> }) . "\n};\n1"; + $source =~ /(.*)/s and $source = $1; # untaint + eval $source or die "$path: $@"; $pkg @@ -534,7 +536,10 @@ @_, ) and last; }; - warn $@ if $@;#d# + if ($@) { + $TERM->ungrab; # better to lose the grab than the session + warn $@; + } } } @@ -574,6 +579,10 @@ goto &$urxvt::term::proxy::AUTOLOAD; } +sub urxvt::term::proxy::DESTROY { + # nop +} + # urxvt::destroy_hook sub urxvt::destroy_hook::DESTROY { @@ -1157,8 +1166,8 @@ type => "button", text => " $text", value => $value, - render => sub { ($item->{value} ? "* " : " ") . $text }, - activate => sub { $cb->($item->{value} = !$item->{value}); }, + render => sub { ($_[0]{value} ? "* " : " ") . $text }, + activate => sub { $cb->($_[0]{value} = !$_[0]{value}); }, }; $self->add_item ($item); @@ -1178,6 +1187,7 @@ sub DESTROY { my ($self) = @_; + delete $self->{term}{_destroy}{$self}; $self->{term}->ungrab; } @@ -1291,11 +1301,11 @@ =over 4 -=item =0 - only fatal messages +=item == 0 - fatal messages -=item =3 - script loading and management +=item >= 3 - script loading and management -=item =10 - all events received +=item >=10 - all events received =back