From ca4890ca7d83a9e5fec531f14f72a04dd0bb7893 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 Jun 2016 11:35:07 +1200 Subject: Use english over punc vars --- urxvt/ext/selection | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/urxvt/ext/selection b/urxvt/ext/selection index bb61eb56..d465d326 100644 --- a/urxvt/ext/selection +++ b/urxvt/ext/selection @@ -11,6 +11,7 @@ use utf8; use 5.006; use Carp; +use English qw(-no_match_vars); our $VERSION = 1.0; @@ -49,8 +50,10 @@ sub on_sel_extend { for my $regex ( @{ $self->{patterns} } ) { while ( $text =~ /$regex/g ) { - if ( $-[1] <= $markofs and $markofs <= $+[1] ) { - my $ofs = $-[1]; + if ( $LAST_MATCH_START[1] <= $markofs + and $markofs <= $LAST_MATCH_END[1] ) + { + my $ofs = $LAST_MATCH_START[1]; my $match = $1; push @matches, [ $ofs, length $match ]; -- cgit v1.2.3