* 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".
Use our own escape sequence for the 'flash' terminfo entry.
Implemented by arming a timer FD and setting a boolean that indicates
we're currently "flashing".
The renderer draws a semi-transparent yellowish layer over the entire
window when "flashing" is active.
22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.
The second parameter, 0|1|2 has the following meaning:
0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
The 16 first entries in the 256-color array are the regular and bright
colors. However, since they can be changed (eventually) at runtime, we
can't statically initialize the 256-color array.
Instead, pick the regular+bright colors directly from the terminal
struct. I.e. the first 16 entries of the 256-color array are now
unused.