What exactly ICH should insert
ICH
inserts:
- in
VTE
: a space with the current attributes, including background/foreground, underline, strikethru etc. - in
xterm
: a space with the current background, but no underline/strikethru - according to
ECMA-48
: an erased character (no mention of attributes)
So there are two questions here.
Attributes that are visible even over an erased/space cell, such as underline, overline, strikethru etc. I'm pretty sure that we should follow xterm
, as that's the standard practice for new cells that are inserted by some means.
Space vs. erased: I think practically the only difference between the two is the copy-pasting behavior for such cells at the end of a line (at least that's how I tested which emulator does what). Both VTE
and xterm
result in copyable spaces.
However, ECMA §8.3.64 clearly states that newly added cells should be in the erased cells (if a terminal makes a distinction at all, see ECMA §6.1.3).
I think that following ECMA could be better, and would be more consistent with the behavior of other escape sequences that cause a cell to be inserted (e.g. IL
, or DCH
at the other end).
Not sure however if deviating from xterm
would cause a less than ideal copy-pasting experience (missing trailing spaces) in some apps.
As part of my ongoing work, I'll fix not to apply underline and such, and most likely change to insert erased cells because that's what is cleaner to implement. We'll revert to inserting spaces if there's a problem.