Permalink
Browse files

Fix :nth acting like it had :ov, colomon++

  • Loading branch information...
1 parent 81d7b36 commit 8b5d5e7adfbeea063b84727f8339981d5f92ba54 @sorear committed May 18, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/CORE.setting
View
@@ -512,6 +512,7 @@ my class Cool {
Q:CgOp { (rnull (set_status (s $/) {$mat})) };
return unitem($mat);
}
+ $ix = $ix max $mat.to if defined $mat;
$ix = $max + 1 if defined($pos);
}
Q:CgOp { (rnull (set_status (s $/) {Match})) };
@@ -544,6 +545,7 @@ my class Cool {
my $M = head($matcher($C.cursor($i++)));
if $M && $M.chars {
Q:CgOp { (rnull (set_status (s '$/') {$M})) };
+ $i = $M.to max $i;
unless defined($nth) && !_match_nth(++$index, $nth) {
$changes++;
push @out, substr($str,$to,$M.from-$to);

0 comments on commit 8b5d5e7

Please sign in to comment.