-
Notifications
You must be signed in to change notification settings - Fork 489
Colors doesn't work very well #88
Comments
this seemed related to the issue in #98, but after finding out the control character there is overwritten i was wondering why colors are shown in this test case at all it turns out the underlying issue is the same as in #98 - the original issue OP saw was likely similar: ansi sequences were handled as color commands, but counted as printed characters. i imagine a prior revision of a simple but wildly insufficient fix here could be to count |
@iximeow Amazing research that you made 😄 |
I think the recommendation there is not to use control characters directly in favor of the available |
Also, not supporting control characters makes hard to use input, for example from a pipe, with colors already inserted, I'm working in a tool that reads some logs and I would like to preserve the already applied colors |
bump, same issue as @Roger |
@Roger , @hilbigan , @macabeus I see it has been a while for this issue but if anyone is interested I have a control sequence parser that converts to a |
If we use
termion::color
at a Text inside of a widget, we will get a strange behaviour. For example:We expected a result like
0x00: green foo blue
, but we get it:A workaround that I use (and works sometimes) is using
cursor::Left
, for example:it will print:
But, this workaround isn't work in all situations, for example, if this text change.
Full example code:
The text was updated successfully, but these errors were encountered: