--- rxvt-unicode/src/perl/matcher 2007/06/10 23:10:01 1.3 +++ rxvt-unicode/src/perl/matcher 2007/06/10 23:42:36 1.4 @@ -12,29 +12,29 @@ )+ }x; -#sub on_user_command { -# my ($self, $cmd) = @_; -# if($cmd =~ s/^matcher\b//) { -# $self->most_recent; -# } -# my $row = $self->nrow; -# my @exec; -# while($row-- > $self->top_row) { -# #my $line = $self->line ($row); -# #my $text = $line->t; -# @exec = $self->command_for($row); -# last if(@exec); -# } -# if(@exec) { -# return $self->exec_async (@exec); -# } -# () -#} -# -#sub most_recent { -# my ($self) = shift; -# () -#} +sub on_user_command { + my ($self, $cmd) = @_; + if($cmd =~ s/^matcher\b//) { + $self->most_recent; + } + () +} + +sub most_recent { + my ($self) = shift; + my $row = $self->nrow; + my @exec; + while($row-- > $self->top_row) { + #my $line = $self->line ($row); + #my $text = $line->t; + @exec = $self->command_for($row); + last if(@exec); + } + if(@exec) { + return $self->exec_async (@exec); + } + () +} sub my_resource { my $self = shift;