ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/matcher
(Generate patch)

Comparing rxvt-unicode/src/perl/matcher (file contents):
Revision 1.37 by root, Sat Jul 24 09:48:43 2021 UTC vs.
Revision 1.38 by sf-exg, Sun Nov 21 17:08:57 2021 UTC

91=cut 91=cut
92 92
93my $url = 93my $url =
94 qr{ 94 qr{
95 (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) 95 (?:https?://|ftp://|news://|mailto:|file://|\bwww\.)
96 [\w\-\@;\/?:&=%\$.+!*\x27,~#]* 96 [\w\-\@;\/?:&=%\$.+!*\x27,~#$urxvt::NOCHAR]*
97 ( 97 (
98 \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\)| # Allow a pair of matched parentheses 98 \([\w\-\@;\/?:&=%\$.+!*\x27,~#$urxvt::NOCHAR]*\)| # Allow a pair of matched parentheses
99 [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic) 99 [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic)
100 )+ 100 )+
101 }x; 101 }x;
102 102
103sub matchlist_key_press { 103sub matchlist_key_press {
251 } 251 }
252 } 252 }
253 253
254 my @defaults = ($url); 254 my @defaults = ($url);
255 my @matchers; 255 my @matchers;
256 for (my $idx = 0; defined (my $res = $self->my_resource ("pattern.$idx") || $defaults[$idx]); $idx++) { 256 for (my $idx = 0; defined (my $res = $self->locale_decode ($self->my_resource ("pattern.$idx")) || $defaults[$idx]); $idx++) {
257 $res = $self->locale_decode ($res);
258 utf8::encode $res;
259 my $launcher = $self->my_resource ("launcher.$idx"); 257 my $launcher = $self->my_resource ("launcher.$idx");
260 $launcher =~ s/\$&|\$\{&\}/\${0}/g if $launcher; 258 $launcher =~ s/\$&|\$\{&\}/\${0}/g if $launcher;
261 my $rend = $self->parse_rend($self->my_resource ("rend.$idx")); 259 my $rend = $self->parse_rend($self->my_resource ("rend.$idx"));
262 unshift @matchers, [qr($res)x,$launcher,$rend]; 260 unshift @matchers, [qr($res)x,$launcher,$rend];
263 } 261 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines