| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
| |
To handle text reflow correctly when a line has a printable character
in the last column, but was still line breaked, we need to track the
fact that the slave inserted a line break here.
Otherwise, when the window width is increased, we'll end up pulling up
the next line, when we really should have inserted a line break.
|
| | |
|
| |
|
|
|
| |
We set initialize=true when allocating a new row. This initializes the
cell to 0, with clean=1.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The algorithm is as follows:
Start at the beginning of the scrollback. That is, at the oldest
emitted lines. This is done by taking the current offset, and adding
the number of (old) screen rows, and then iterating until we find the
first allocated line.
Next, we iterate the entire old grid. At the beginning, we allocate a
line for the new grid, and setup a global pointer for that line, and
the current cell index.
For each line in the old grid, iterate its cells. Copy the the cells
over to the new line. Whenever the new line reaches its maximum number
of columns, we line break it by increasing the current row index and
allocating a new row (if necessary - we may be overwriting old
scrollback if the new grid is smaller than the old grid).
Whenever we reach the end of a line of the old grid, we insert a line
break in the new grid's line too **if** the last cell in the old line
was empty. If it was **not** empty, we **don't** line break the new
line.
Furthermore, empty cells in general need special consideration. A line
ending with a string of empty cells doesn't have to be copied the new
line. And more importantly, should **not** increase the new line's
cell index (which may cause line breaks, which is incorrect).
However, if a string of empty cells is followed by non empty cells, we
need to copy all the preceding empty cells to the line too.
When the entire scrollback history has been reflowed, we need to
figure out the new grid's offset.
This is done by trying to put the **last** emitted line at the bottom
of the screen. I.e. the new offset is typically "last_line_idx -
term->rows". However, we need to handle empty lines. So, after
subtracting the number of screen rows, we _increase_ the offset until
we see a non-empty line. This ensures we handle grid's that doesn't
fill an entire screen.
Finally, we need to re-position the cursor. This is done by trying to
place the cursor **at** (_not_ after) the last emitted line. We keep
the current cursor column as is (but possibly truncated, if the grid's
width decreased).
|
| |\ |
|
| | | |
|
| |/ |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
We've resized, and reset the render's 'last-buf' pointer; any scroll
damage we have is **not** valid anymore.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
| |
This forces a full resize operation, even though actual window
size (or scale) hasn't changed.
|
| | |
|
| | |
|
| |
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
|
| |
|
|
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
Only applicable in server mode.
|
| |
|
|
|
|
| |
But place an upper limit on the number of iterations we read, to
prevent starvation caused by a bad behaving client to constantly
writes data.
|
| | |
|
| | |
|
| |
|
|
| |
When specified, we don't exit when the slave/client process exits.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only support 16 parameters, and for each parameter, 16
sub-parameters. If we ever hit that limit (or rather, if the client
writes 17 (sub) parameters), log this and stop incrementing the
parameter index variable.
For performance reason, we implement the following behavior:
* We never increment the parameter index past the supported
number. This ensures all code *accessing* the parameter list can do
so without verifying the validity of the index.
* The *first* time we see too many parameters, and the first time we
see too many sub parameters, log this. Then *never* log again. Even
if we see too many parameters in a completely different escape. This
is so that we don't have to keep a "have warned" boolean in the
terminal struct, but can use a simple function local static
variable.
|
| |
|
|
|
|
| |
Assume we don't handle 'CSI 4 X'. Furthermore, assume we receive the
following: 'CSI 1;2;3;4X'. In this case, only log '4X' as un-handled,
not the entire CSI string.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This implements the following queries:
* report window size in pixels
* report cell size in pixels
* report window size in chars
We also log a warning for the remaining window operation queries.
|
| |
|
|
|
| |
We still don't implement it, but now we at least recognize it and log
a warning when it is implemented.
|
| |
|
|
| |
We don't support rectangular editing
|
| |
|
|
|
| |
We only support 16 (sub) parameters and thus there's no need for
64-bit index variables.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
0x3a/0x3b are ':' and ';'. These should not only switch to the 'csi
param' state, but also be parsed as a parameter.
This fixes an issue where a multi-parameter escape with the first
parameter omitted was parsed incorrectly - as if the first parameter
wasn't there.
I.e. "\e[;123r" was parsed as "\e[123r"
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
mbrtowc() returns an unsigned. Need to cast to signed before checking
if less than zero.
This fixes an issue where invalid utf-8 sequences where treated as valid.
|
| |
|
|
|
| |
We don't implement it, so no point in warning about save/restore not
begin implemented.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
When term_print() was implemented, it introduced a regression where
printing a character when the last cursor was in the last column on a
line would print the character in the wrong column.
This is because term_print() retrieved a pointer to the current
cell *before* line wrapping (and possibly inserting empty cells).
|
| |
|
|
|
| |
This should reduce the risk of mixing up an input timestamp with the
corresponding rendered frame.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We already had the functionality, we just didn't expose it in the
terminfo.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Allow/disallow subpixel antialiasing in font_glyph_for_wc(), not using
font_enable_subpixel_antialias().
|
| | |
|
| | |
|
| |\ |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This reverts commit 84739d78c626ad12543417dc1e3038abd6a4e2d5.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
If synchronized updates are already enabled when we receive a request
to enable them, extend the timeout.
|
| | |
|
| |
|
|
|
| |
Since I haven't seen this in the wild, let's abort() to make sure we
catch when an application does this, so we can verify it really works.
|
| |\ |
|
| | |
| |
| |
| |
| | |
Disable the delayed rendering timers when enabling application
synchronized updates, not every time we've received ptmx data.
|
| | |
| |
| |
| | |
From render -> terminal
|
| | |
| |
| |
| |
| | |
This ensures we can recover from a crashing (or bad behaving)
application that sends a BSU but then never sends an ESU.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
| |
Calling render_disable_refresh() causes update requests to that
terminal to be ignored.
Calling render_enable_refresh() re-enables updates.
|
| |
|
|
| |
I **really** want to know if someone is using these...
|
| | |
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add data structure to term->vt. This structure tracks the free-form
data that is passed-through, and the handler to call at the end.
Intermediates and parameters are collected by the normal VT
parser. Then, when we enter the passthrough state, we call dcs_hook().
This function checks the intermediate(s) and parameters, and selects
the appropriate unhook handler (and optionally does some execution
already).
In passthrough mode, we simply append strings to an internal
buffer. This might have to be changed in the future, if we need to
support a DCS that needs to execute as we go.
In unhook (i.e. when the DCS is terminated), we execute the unhook
handler.
As a proof-of-concept, handlers for BSU/ESU (Begin/End Synchronized
Update) has been added (but are left unimplemented).
|
| |
|
|
|
| |
Depending on the font, it may not have an entry for code point '0',
which will cause us to try to load fallback fonts.
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Lookup is now done in code, using a switch-statement
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes the keypad enter key emit "\eOM" in keypad application
mode.
|
| | |
|