--- rxvt-unicode/src/perl/matcher 2014/07/30 15:22:51 1.32 +++ rxvt-unicode/src/perl/matcher 2014/10/13 19:39:42 1.33 @@ -268,22 +268,23 @@ # fetch the line that has changed my $line = $self->line ($row); my $text = $line->t; + my $rend; # find all urls (if any) for my $matcher (@{$self->{matchers}}) { while ($text =~ /$matcher->[0]/g) { #print "$&\n"; - my $rend = $line->r; + $rend ||= $line->r; # mark all characters as underlined. we _must_ not toggle underline, # as we might get called on an already-marked url. &{$matcher->[2]} for @{$rend}[$-[0] .. $+[0] - 1]; - - $line->r ($rend); } } + $line->r ($rend) if $rend; + () }