Closed rkleemann closed 11 years ago
@rkleemann Great catch! I'll look at this after work today.
@hoelzro I haven't seen any action on this in a couple of weeks. What's going on with it?
@rkleemann Sorry; I've been swamped with vim-perl work for the last few weeks. Things should quiet down in a week or so.
Good luck, I'll look forward to your completion soon.
I just wanted to make sure it didn't get dropped.
On Fri, May 24, 2013 at 3:43 PM, Rob Hoelz notifications@github.com wrote:
@rkleemann https://github.com/rkleemann Sorry; I've been swamped with vim-perl work for the last few weeks. Things should quiet down in a week or so.
— Reply to this email directly or view it on GitHubhttps://github.com/petdance/ack2/issues/276#issuecomment-18434049 .
Fixed!
This is going in 2.06.
Adding capturing parenthesis to a search pattern can cause the match to be incorrectly highlighted, and worse, adding parenthesis around the pattern can throw in a mysterious
[0m
. Experimenting with the -o flag seems to produce the correct output without the[0m
, so this is likely limited to the highlighting code. Experimenting with non-capturing parenthesis(?: )
produces the correct output also.The pattern
(foo)bar
will highlight thefoo
, but not thebar
. The patternfoo(bar)
will highlight thebar
, but not thefoo
. Both patterns((foo)bar)
and((foo)(bar))
will add the additional[0m
, but the latter will also highlight the[0m
in addition to thefoobar
.