--- rxvt-unicode/src/perl/selection-popup 2006/01/19 16:22:13 1.15 +++ rxvt-unicode/src/perl/selection-popup 2006/01/20 10:27:08 1.17 @@ -56,8 +56,11 @@ }; for ($text) { - $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); - $add_button->("eval perl expression" => sub { no warnings; $_ = eval $_ }); + /./ + and $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); + + /./ + and $add_button->("eval perl expression" => sub { no warnings; $_ = eval $_ }); /^(\S+):(\d+):?$/ and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); @@ -71,6 +74,7 @@ /^(http|ftp|telnet|irc|news):\// and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); + warn "hook for $self $self->{term}\n";#d# for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) { if (my ($title, $cb) = $hook->($popup)) { $add_button->($title, $cb);