diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-19 11:35:07 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-19 11:35:07 +1200 |
commit | ca4890ca7d83a9e5fec531f14f72a04dd0bb7893 (patch) | |
tree | 7044b24f27f6086a09e6ecedf3e842b4b6d53a44 /urxvt/ext/selection | |
parent | Add explicit arg to return (diff) | |
download | dotfiles-ca4890ca7d83a9e5fec531f14f72a04dd0bb7893.tar.gz dotfiles-ca4890ca7d83a9e5fec531f14f72a04dd0bb7893.zip |
Use english over punc vars
Diffstat (limited to 'urxvt/ext/selection')
-rw-r--r-- | urxvt/ext/selection | 7 |
1 files 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 ]; |