| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This struct may contain padding bytes, whose values are indeterminate
after any store operation[1]. It may also contain unnamed members,
whose values are always indeterminate[2]. Using memcmp() isn't a
reliable way to compare structs where either of these may be present.
[1]: ISO/IEC 9899:1999 §6.2.6.1, paragraph 6
[2]: ISO/IEC 9899:1999 §6.7.8, paragraph 9
See also:
* https://wiki.sei.cmu.edu/confluence/display/c/EXP42-C.+Do+not+compare+padding+data
* https://sourceware.org/git/?p=glibc.git;a=blob;f=time/bits/types/struct_timespec.h;hb=756c306502498f9
|
| | |
|
| |
|
|
|
| |
Don't call decset_decrst() with an unhandled parameter (and with
'enabled' uninitialized!)
|
| | |
|
| |
|
|
| |
I.e. save/restore cursor-blink state.
|
| |
|
|
|
|
|
|
| |
E.g. only set mouse reporting to NONE, if mouse reporting mode is SGR
and an DECRST SGR is issued.
Do *not* reset the mouse mode if e.g. mouse reporting mode is SGR and
an DECRST URXVT is issued.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This function stores the current state of DECSET private modes.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, our secondary DA response indicated a) VT420, b) an XTerm
version number.
Now, we indicate VT220 (which corresponds to the primary DA response),
and we report foot's version number as MMmmpp. I.e major, minor and
patch versions, using two digits.
E.g. 1.4.2 is encoded as 010402
|
| |
|
|
|
|
|
|
| |
We do not implement
* Selective Erase
* Technical Character Set
* Terminal state interrogation
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also update 'Se' capability in the terminfo, to reflect this.
|
| | |
|
| |
|
|
|
| |
This fixes a crash that occurred when the last rendered cursor cell
had scrolled off screen, and \E[3J (clear scrollback) was executed.
|
| | |
|
| |
|
|
|
| |
Before this patch, an invalid parameter would not change the cursor
style, but could cause the cursor to start (or stop) blinking.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of the escape sequences on the "CSI Ps ; Ps ; Ps t" form are
expected to return a reply. Thus, not having these implemented means
we will hang if the client sends these escapes.
Not all of these escapes can be meaningfully implemented on Wayland,
and thus this implementation is best effort.
We now support the following escapes:
* 11t - report if window is iconified (always replies "no")
* 13t - report window position (always replies 0,0)
* 13;2t - report text area position (replies with margins, since we
cannot get the window's position)
* 14t - report text area size, in pixels
* 14;2t - report window size, in pixels
* 15t - report screen size, in pixels
* 16t - report cell size, in pixels
* 18t - report text area size, in cells
* 19t - report screen size, in cells
|
| |
|
|
|
| |
This way, the 'normal' and 'alt' grids have their own cursor state,
and we don't need to switch between them.
|
| |
|
|
|
|
|
|
| |
All are printf() formatter related. Even if a variable is e.g. a
'short', when used in an expression like '<variable> - 1' it is
promoted to an 'int'.
Closes #16
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where we failed to restore the cursor correctly
when exiting from the alternate screen, if the client had sent escapes
to save the cursor position while inside the alternate screen.
This was because we used the *same* storage for saving the cursor
position through escapes, as for saving it when entering the alternate
screen.
Fix by using a custom variable dedicated to normal <--> alt screen
switching.
|
| |
|
|
|
|
|
|
|
|
|
| |
Update the sixels' 'row' attribute when re-flowing a grid, to ensure
it is rendered at the correct place.
This should work in most cases, but will break when the cell size has
changed (e.g. font size increase/decrease, or a DPI change).
This patch also moves the sixel image list from the terminal struct
into the grid struct. The sixels are per-grid after all.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This implements the CSI escapes for retrieving and (re)setting the
palette size.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
We don't implement it, so no point in warning about save/restore not
begin implemented.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Blinking can be enabled either by setting the cursor style with
CSI Ps SP q
and selecting a blinking style.
Or, with 'CSI ? 12 h'
Note that both affect the same internal state. I.e. you can disable
blinking with CSI ? 12l after having selected a blinking cursor
style. This is consistent with XTerm behavior.
|
| | |
|
| | |
|
| |
|
|
| |
This gets rid of spam when cat:ing binary data.
|
| |
|
|
|
|
|
|
| |
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?)
|
| | |
|
| |
|
|
| |
By replying with "Device OK"
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes the result of 'wraptest', by Mattias Engdegård, match the
behavior of 'DEC' (the architectural behavior of DEC terminals).
|
| |
|
|
|
| |
* 0g - clear tab stop at current column
* 3g - clear all tab stops
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
In Wayland, we neither _have_ an urgency hint to set, nor can we raise
the window(?)
|
| |
|
|
|
| |
1042: set 'urgency' window manager hint when receiving ctrl-g
1043: raise window when receiving ctrl-g
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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>).
|
| |
|
|
|
| |
And, 'insert mode' isn't activated with \e[h, but with
\e[4h.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
When enabled, mouse scrolls in the alternate screen are converted to
up/down key presses.
|
| |
|
|
| |
This fixes an occasional SIGSEGV
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|