Bug 409016

Summary: konsole `\033[0m` not working start from second page of scroll
Product: [Applications] konsole Reporter: 林果皞 <limkokhole>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 17.12.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: `\033[0m` not working started from 12th row on second page of scroll.

Description 林果皞 2019-06-21 22:35:34 UTC
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
Comment 1 Egmont Koblinger 2019-06-23 14:24:45 UTC
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.