-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect result display with empty line and colors #599
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
microsoft/vscode#31252
When I search
^$
, I get, for each file, a correctly formatted result line for the first empty line in the file, but the other result lines have extra color escape codes for a 'match' before the line number.The command I'm using to demonstrate is
rg --color ansi --colors 'path:none' --colors 'line:none' --colors 'match:fg:red' --colors 'match:style:nobold' --heading --line-number '^$' > out.txt
- the extra--colors
flags are not necessary to the repro, they just make it a little easier to see the issue. And this might be a good time to ask whether you've made any progress towards #244 😁Result
You can see the first line starts with the
2:
surrounded by escapes. But other lines first have escape codes for a match, then4:
, then another set of codes for a match.Expected:
I search another file for
^foo$
.The text was updated successfully, but these errors were encountered: