1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-04-08 16:53:58 +02:00
Andrew Gallant 2a14bf2249
printer: fix colors on empty matches
This fixes a bug where a "match" color escape was erroneously emitted
after the new line character. This is because `^` is actually allowed to
match after the end of a trailing new line, which means `^$` matches both
before and after the trailing new line when multiline mode is enabled.
The trailing match was causing the phantom escape sequence to appear,
which we don't want.

Incidentally, this is the root cause of #441 as well, although this commit
doesn't fix that issue, since the line itself is printed before we detect
the phantom match.

Fixes #599
2017-10-21 22:40:10 -04:00
..
2016-09-09 22:58:30 -04:00
2017-10-21 22:40:10 -04:00