--- rxvt-unicode/src/perl/selection 2006/01/21 21:20:34 1.32 +++ rxvt-unicode/src/perl/selection 2006/01/23 23:13:03 1.34 @@ -13,7 +13,6 @@ my ($self) = @_; for (my $idx = 0; defined (my $res = $self->x_resource ("selection.pattern-$idx")); $idx++) { - no re 'eval'; # just to be sure $res = $self->locale_decode ($res); utf8::encode $res; push @{ $self->{patterns} }, qr/$res/; @@ -22,7 +21,7 @@ () } -# "find interetsing things"-patterns +# "find interesting things"-patterns my @mark_patterns = ( # common types of "parentheses" qr{ (?()] *( + qr{\G [\ \t|&;<>()]* ( (?: [^\\"'\ \t|&;<>()]+ | \\. @@ -112,7 +111,7 @@ # convert back from UTF-8 offset space to character space { - my $length = substr $text, $ofs, $len; + my $length = substr "$text ", $ofs, $len; utf8::decode $length; $len = length $length; }