aboutsummaryrefslogtreecommitdiff
path: root/urxvt/ext
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-19 11:40:53 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-19 11:40:53 +1200
commit6785ec225ae4657ec8742e89a9d7653ad91e01ca (patch)
tree7a624963fef5cdcd51725a89e866b95801c282e6 /urxvt/ext
parent0466a1e52a47bd955e157dbfe19d4199f3a60d43 (diff)
downloaddotfiles-6785ec225ae4657ec8742e89a9d7653ad91e01ca.tar.gz
dotfiles-6785ec225ae4657ec8742e89a9d7653ad91e01ca.zip
Simplify/tidy regex calls
Diffstat (limited to 'urxvt/ext')
-rw-r--r--urxvt/ext/selection4
1 files changed, 2 insertions, 2 deletions
diff --git a/urxvt/ext/selection b/urxvt/ext/selection
index edc1a1bb..2ca08011 100644
--- a/urxvt/ext/selection
+++ b/urxvt/ext/selection
@@ -21,7 +21,7 @@ sub on_init {
if ( defined( my $res = $self->resource('cutchars') ) ) {
$res = $self->locale_decode($res);
push @{ $self->{patterns} },
- qr{\G [\Q$res\E[:space:]]* ([^\Q$res\E[:space:]]+) }x;
+ qr{\G [\Q$res\E[:space:]]* ([^\Q$res\E[:space:]]+) }msx;
}
$self->{enabled} = 1;
@@ -49,7 +49,7 @@ sub on_sel_extend {
study $text; # _really_ helps, too :)
for my $regex ( @{ $self->{patterns} } ) {
- while ( $text =~ /$regex/g ) {
+ while ( $text =~ m{$regex}gmsx ) {
if ( $LAST_MATCH_START[1] <= $markofs
and $markofs <= $LAST_MATCH_END[1] )
{