… | |
… | |
91 | =cut |
91 | =cut |
92 | |
92 | |
93 | my $url = |
93 | my $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 | |
103 | sub matchlist_key_press { |
103 | sub 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 | } |