-
Notifications
You must be signed in to change notification settings - Fork 88
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
less -R resets colours over multilines #587
Comments
Not if you read the documentation of
|
Ah, I see the docs for Thanks for the pointer. |
That doesn't mean that it would be a bad behavior to let colors continue on th next line, however, most (all?) syntax highlighters do reset the color at the end of the line and/or set-it-again at the next line even if the same color continues at the next line. |
The issue with maintaining colors across lines is it would be impossible to seek to different parts of the file. All file movement would need to be done by reading, to ensure that we know what color to use at the start of each line. So, for example, issuing the |
The behaviour of
less -R
is surprising when outputting formatted text over multiples lines.Steps to repro (the colour output is lost in this Github bug report)
-R
is expected to allow through colour codes, but instead it inserts a\33[m
reset at the end of the first line, resulting inalso green
not being coloured green.Tested with less 530 and less 643.
The text was updated successfully, but these errors were encountered: