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.27 by sf-exg, Sun Jun 15 11:38:00 2014 UTC vs.
Revision 1.29 by sf-exg, Sun Jun 15 21:06:53 2014 UTC

5 5
6#:META:RESOURCE:%.launcher:string:default launcher command 6#:META:RESOURCE:%.launcher:string:default launcher command
7#:META:RESOURCE:%.button:string:the button, yeah 7#:META:RESOURCE:%.button:string:the button, yeah
8#:META:RESOURCE:%.pattern.:string:extra pattern to match 8#:META:RESOURCE:%.pattern.:string:extra pattern to match
9#:META:RESOURCE:%.launcher.:string:custom launcher for pattern 9#:META:RESOURCE:%.launcher.:string:custom launcher for pattern
10#:META:RESOURCE:%.rend.:string:custom rednition for pattern 10#:META:RESOURCE:%.rend.:string:custom rendition for pattern
11 11
12=head1 NAME 12=head1 NAME
13 13
14matcher - match strings in terminal output and change their rendition 14matcher - match strings in terminal output and change their rendition
15 15
255 255
256sub find_matches { 256sub find_matches {
257 my ($self, $row, $col) = @_; 257 my ($self, $row, $col) = @_;
258 my $line = $self->line ($row); 258 my $line = $self->line ($row);
259 my $text = $line->t; 259 my $text = $line->t;
260 my $off = $line->offset_of ($row, $col) if $col; 260 my $off = $line->offset_of ($row, $col) if defined $col;
261 261
262 my @matches; 262 my @matches;
263 for my $matcher (@{$self->{matchers}}) { 263 for my $matcher (@{$self->{matchers}}) {
264 my $launcher = $matcher->[1] || $self->{launcher}; 264 my $launcher = $matcher->[1] || $self->{launcher};
265 while ($text =~ /$matcher->[0]/g) { 265 while ($text =~ /$matcher->[0]/g) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines