Having them as error messages was nice when we where still missing
lots of sequences.
Now we don't anymore, and these just spam stdout as well as syslog
when e.g. cat:ing binary data.
Report us as being VT220, as VT420 causes vttest to send a
DECRQSS. This is a DCS request that we don't implement (there's no DCS
handling *at all* - all DCS strings are ignored).
Should be ok as no one appears to care about this one. Other terminals
report a much lower level (urxvt for example, replies with vt100. We
used to reply with vt102, which also was fine).
Pretend we're a VT420, with a couple of supported features
indicated. Note that I haven't verified we support *everything* that
each features entails - or even what exactly a feature *is* (locator
port?)
When support was added for DECOM (absolute/relative row addressing), a
small but noticeable (~3.5%) performance regression was introduced.
Try to improve the situation by simplifying the relative-to-absolute
conversion; only the row needs to be transformed.
* It takes a parameter, that indicates the number of tab stops to move
through
* Use the tab stops defined in the tab stops list, not hard coded mod
8 columns.
The default is absolute mode, where 0,0 is the upper left corner of
the screen.
In relative mode, the origin is relative the top scroll margin.
Internally, we always track the current cursor position in absolute
mode. Every time we the client *sets* or *queries* the cursor position
in relative mode, we translate it to absolute.
There must be at least one scrolling row. I.e. the bottom margin must
be larger than the top margin.
Note that trying to set an invalid region really will
be *ignored*. I.e. we *don't* reset the scrolling region.
This conforms to xterm's behavior.
Only a color space ID of '2' means the sequence is an RGB
sequence. Update existing code to verify this, and ignore sequences
with other color space IDs.
Except color space ID '5', which is the same as a regular 38;5;<idx>
sequence, but using sub-parameters instead (38:2:5:<idx>).
That is, remove the 'regular' and 'bright' color arrays. This is
possible since the 256-color array is defined such that the first 16
colors map to the regular and bright colors.
The 'attributes' struct is now 8 bytes and naturally packed (used to
be 9 bytes, artificially packed).
'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes,
artificially packed).
Furthermore, the glyph is stored as a wchar instead of a char*. This
makes it easier (faster) to do glyph lookup when rendering.
Replace with generic error log messages that simply says the
ESC/CSI/OSC sequence is unhandled. This can mean either invalid or
unimplemented, depending on the context.
This patch takes a bit from the foreground color value in a
cell (todo: split up foreground/background into bitfields with a
separate field for 'foreground/background' has been set), and only
re-renders cells that aren't marked as clean.
Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy
to erase cells - we can (keep doing) do that by simply memsetting a
cell range to 0.
I.e. it issues a \E[2 q regardless of what we've configured the
terminfo Se entry to.
So, make \E[2 q mean "the user configured cursor style" (which
defaults to 'block').
According to the specs, \E[0 q means a blinking block cursor. However,
since it also states that \E[1 q *also* is a blinking block cursor,
and that it is the default, *and* given that fact that parameter-less
CSIs typically means "reset", let's make it mean "reset to the user
configured cursor style".