Created attachment 121066 [details] `\033[0m` not working started from 12th row on second page of scroll. SUMMARY konsole `\033[0m` not working started from second page of scroll. STEPS TO REPRODUCE 1. Run with command for i in {1..100}; do echo "$i"; echo -en '\033[1;42m AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \033[0m'; echo -e 'next text'; done: 2. Ensure the text overflow to bottom. 3. Scroll the page, the second page (12th row on screenshot) color not reset by `\033[0m`. EXPECTED RESULT `\033[0m' should able to reset color like first page do. SOFTWARE/OS VERSIONS Ubuntu 18.04.2 LTS, Gnome, konsole 17.12.3
It's the bce nightmare again (https://bugzilla.gnome.org/show_bug.cgi?id=754596). Strictly speaking, konsole behaves correctly. "\033[0m" is definitely okay. It switches to the default color and applies that for any *newly printed* cell as expected – not for other cells though, like the rest of the line when this sequence is recieved (they are already green by that time). On the other hand, bce (which is responsible for painting the next line in green) is arguably a terribly designed feature. gnome-terminal tries to mitigate the problem it causes by a slightly different behavior, although cannot fully fix the faulty design.