url-select: fixed underlining of URLs, fixes issue #47

This commit is contained in:
Bert Münnich 2014-04-07 21:01:29 +02:00
parent 729db13120
commit 34ae181a0a

View File

@ -95,8 +95,7 @@ sub line_update {
for my $pattern (@{$self->{pattern}}) { for my $pattern (@{$self->{pattern}}) {
while ($text =~ /$pattern/g) { while ($text =~ /$pattern/g) {
my $url = $&; my $url = $&;
my ($beg, $end) = ($-[1], $+[1] - 1); my ($beg, $end) = ($-[0], $+[0] - 1);
--$end if $url =~ /["')]$/;
for (@{$rend}[$beg .. $end]) { for (@{$rend}[$beg .. $end]) {
$_ |= urxvt::RS_Uline; $_ |= urxvt::RS_Uline;