mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
csi: '\E[0 q' resets the cursor style to the default, not '\E[2 q'
Also update 'Se' capability in the terminfo, to reflect this.
This commit is contained in:
parent
fd4904d82a
commit
7f65bd1c20
3 changed files with 16 additions and 7 deletions
|
|
@ -39,6 +39,10 @@
|
|||
* Mouse cursor from `hand2` to `left_ptr` when client is capturing the
|
||||
mouse.
|
||||
* Sixel images are now removed when the font size is **decreased**.
|
||||
* `DECSCUSR` (_Set Cursor Style_, `CSI Ps SP q`) now uses `Ps=0`
|
||||
instead of `Ps=2` to reset the style to the user configured default
|
||||
style. `Ps=2` now always configures a _Steady Block_ cursor.
|
||||
* `Se` terminfo capability from `\E[2 q` to `\E[ q`.
|
||||
|
||||
|
||||
### Deprecated
|
||||
|
|
|
|||
17
csi.c
17
csi.c
|
|
@ -1446,12 +1446,17 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
case 'q': {
|
||||
int param = vt_param_get(term, 0, 0);
|
||||
switch (param) {
|
||||
case 0: case 1: /* blinking block */
|
||||
term->cursor_style = CURSOR_BLOCK;
|
||||
case 0: /* blinking block, but we use it to reset to configured default */
|
||||
term->cursor_style = term->default_cursor_style;
|
||||
if (term->default_cursor_blink)
|
||||
term_cursor_blink_enable(term);
|
||||
else
|
||||
term_cursor_blink_disable(term);
|
||||
break;
|
||||
|
||||
case 2: /* steady block - but can be overriden in footrc */
|
||||
term->cursor_style = term->default_cursor_style;
|
||||
case 1: /* blinking block */
|
||||
case 2: /* steady block */
|
||||
term->cursor_style = CURSOR_BLOCK;
|
||||
break;
|
||||
|
||||
case 3: /* blinking underline */
|
||||
|
|
@ -1469,8 +1474,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
}
|
||||
|
||||
if (param <= 6) {
|
||||
if (param == 0 || param & 1)
|
||||
if (param > 0 && param <= 6) {
|
||||
if (param & 1)
|
||||
term_cursor_blink_enable(term);
|
||||
else
|
||||
term_cursor_blink_disable(term);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ foot+base|foot base fragment,
|
|||
Cs=\E]12;%p1%s\E\\,
|
||||
E3=\E[3J,
|
||||
Ms=\E]52;%p1%s;%p2%s\E\\,
|
||||
Se=\E[2 q,
|
||||
Se=\E[ q,
|
||||
Ss=\E[%p1%d q,
|
||||
Sync=\EP=%p1%ds\E\\,
|
||||
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue