-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 behavior of ANSI '\033[K' at the end of a line. #15802
Comments
what @lhecker any ideas if is this the same thing you were also just seeing with |
No, that one only happens with OpenConsole. |
There are two issue to be aware of here:
What we're seeing in the screen capture above is the effect of part 1, but not part 2. So that's why one of the characters is being blanked out rather than overwritten. We only implemented part 2 in PR #14936, which I don't think is included in version 1.17. Either way you're going to end up with a missing character if you execute |
I should also note that there was a workaround for this issue that was mentioned in the grep bug report. If you do something like this:
Then grep won't inject those |
@j4james Thanks a lot for finding the answer for me. |
Well, I think that answers that. Thanks for the detailed writeup! |
Windows Terminal version
1.17.11461.0
Windows build number
10.0.22621.0
Other Software
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
grep (GNU grep) 3.0
Steps to reproduce
First ssh to linux.
Creat a file 'test.txt' like this:
grep 'abcd' test.txt --color=always
If Colored String at the end of the line, the last character will be lost. If Colored String at the begin of the line, the last character of the previous line will be lost.
download the test.color file, it looks like:
It seems like \033[K clean the last character. How can I avoid it?
Expected Behavior
No response
Actual Behavior
The text was updated successfully, but these errors were encountered: