Open daxxycodes opened 2 years ago
I'm not sure if there can be done something on the library level. Isn't this behavior entirely depending on how the terminal is implemented. Gnome terminal behaves like this for instance
which is basically what one would expect right?
I'm glad it works in at least some cases. :) In mine, I started adding "\033[0m\033[K", but I don't know if that's a great fix for all situations.
In Python on Mac OS 12 (zsh), while doing
print(chalk.bg_blue("some long line of text"))
if "some long line of text" wraps to the next line in the terminal (say because the text hits the right edge of the terminal after "of"), then in the second line, the blank space after "text" will also be background-colored through to the right edge of the terminal window.