Closed stewartjohnson closed 14 years ago
I don't think there is anything I can change in rainbow to resolve this issue. Looks like printf is counting also ANSI escape codes as normal characters when doing alignment.
The only solution I can think of now is to monkey-patch Kernel#printf, but this sounds like a dangerous thing to do. I won't do this in rainbow, but If you're brave you can try it by yourself :)
When I'm using rainbow to add colour to strings that are displayed with printf, it seems to mess up the alignments. Example using irb below. Is there anything I can do to work around this?