--- rxvt-unicode/src/perl/selection-popup 2006/03/08 15:43:02 1.19 +++ rxvt-unicode/src/perl/selection-popup 2011/01/04 21:34:18 1.22 @@ -14,7 +14,7 @@ sub on_start { my ($self) = @_; - $self->{browser} = $self->x_resource ("urlLauncher") || "x-www-browser"; + $self->{browser} = $self->x_resource ("urlLauncher") || "sensible-browser"; $self->grab_button (3, urxvt::ControlMask); @@ -56,6 +56,9 @@ }; for ($text) { + /\n/ + and $add_button->("newlines to spaces" => sub { y/\n/ / }); + /./ and $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); @@ -74,7 +77,7 @@ /[\\"'\ \t|&;<>()]/ and $add_button->("shell quote" => sub { $_ = "\Q$_" }); - /^(http|ftp|telnet|irc|news):\// + /^(https?|ftp|telnet|irc|news):\// and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) {