mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
csi: support DECRQM queries for ECMA-48 (SM/RM) modes
This is in addition to the existing support for DECRQM queries of DEC private modes.
This commit is contained in:
parent
9d9690410a
commit
fa01bf2b75
3 changed files with 30 additions and 5 deletions
17
csi.c
17
csi.c
|
|
@ -1429,6 +1429,23 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
}
|
||||
|
||||
case 'p': {
|
||||
/*
|
||||
* Request status of ECMA-48/"ANSI" private mode (DECRQM
|
||||
* for SM/RM modes; see private="?$" case further below for
|
||||
* DECSET/DECRST modes)
|
||||
*/
|
||||
unsigned param = vt_param_get(term, 0, 0);
|
||||
unsigned status = DECRPM_NOT_RECOGNIZED;
|
||||
if (param == 4) {
|
||||
status = decrpm(term->insert_mode);
|
||||
}
|
||||
char reply[32];
|
||||
size_t n = xsnprintf(reply, sizeof(reply), "\033[%u;%u$y", param, status);
|
||||
term_to_slave(term, reply, n);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'u': {
|
||||
enum kitty_kbd_flags flags =
|
||||
term->grid->kitty_kbd.flags[term->grid->kitty_kbd.idx];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue