GNOME Bugzilla – Bug 740789
\e[K misbehavior at right margin
Last modified: 2018-09-11 10:07:02 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1168182 <- see here for technical details \e[K is emitted by grep at every color change as a workaround against the full line having a weird background color. This, however, when emitted when the line is already full, causes the last character to be dropped, causing incorrect data to be displayed to the user. I believe here we should deviate from xterm's behavior (it does the same as we do now) and follow what konsole does.
Created attachment 291604 [details] [review] Fix
Note: seems to me that there's no test case for this in vttest. We still pass vttest's 1, 2 and 8.
Fixed.
Just for reference: iTerm2 (latest nightly snapshot) behaves as we do now (the one that makes most sense in my opinion). Terminal.app (Yosemite) chops off the last character on a \e[K, yet prints the next one in the next row instead of there, leaving a gap (that's not even copy-pasted) at the end of the line. Approximately just as stupid as what xterm does :)
Continued at https://gitlab.gnome.org/GNOME/vte/issues/43.