diff options
author | Andrew Gallant <jamslam@gmail.com> | 2017-05-29 09:51:58 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-05-29 09:51:58 -0400 |
commit | 112b3c5e0ae232fdbce90cd505c57f2c4abc4a22 (patch) | |
tree | 747eb52e25a0633349f83d560587365fd6e7bd8c /complete | |
parent | 4c78ca8b70e2c434ecaab3f175525aae81229f9d (diff) |
Fix another bug in -o/--only-matching.
The handling of the -o/--only-matching was incorrect. We cannot ever
re-run regexes on a *subset* of a matched line, because it doesn't take
into account zero width assertions on the edges of the regex. This
occurs whenever an end user uses an assertion explicity, but also occurs
when one is used implicitly, e.g., with the `-w` flag.
This instead reuses the initial matched range from the first regex
match. We also apply this fix to coloring.
Fixes #493
Diffstat (limited to 'complete')
0 files changed, 0 insertions, 0 deletions