It seems like it's not possible for style runs to have colored but empty styles (or, I'm guessing, vice versa?).
If the server sends "COLOR1 text COLOR2 text COLOR3" on a line, the third color gets lost when you try to work on the capture using style runs.
Any chance of getting empty colors added, or of getting raw ansi data passed to match functions? They affect the subsequent line.
// adds text to a line, adds to current style run if possible
void CPaneLine::AddStyle (const CPaneStyle style)
{
// don't need to if no text in style (maybe)
if (style.m_sText.empty ())
return;
...
I'm finding this to be a critical missing piece of trying to Simulate captured lines that are supposed to color bleed.
I don't know if this has no side effects, whereas passing a new raw ansi data field to the trigger scripts would be guaranteed free of side effects, but it seems to be working fine for me so far.
I've been testing since last night. It fixes my problem and doesn't seem to introduce new ones. I'm willing to bet that noone will ever loop through styles in a way that cares whether the last one has no text in it. At worst someone will have a final empty ColourTell, which is basically a noop.