diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-19 07:57:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-19 07:57:51 +0000 |
| commit | 7472e9c1524442e1a91f57b981229159f4bc6fb6 (patch) | |
| tree | 6c6f5a87a25ad59e8af24634686d3e481e9dbc10 | |
| parent | csi: tweak logging: no need to mention 'CSI' twice (diff) | |
csi: recognize DECRQM (CSI ? Ps $ p)
The client sends this to request the state of DEC private modes.
We don't support any of them, so for now, reply with 'reset'.
| -rw-r--r-- | csi.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -822,6 +822,29 @@ csi_dispatch(struct terminal *term, uint8_t final) break; } + case 'p': { + if (term->vt.private[1] != '$') { + LOG_ERR("unimplemented: %s", csi_as_string(term, final)); + abort(); + } + + unsigned param = vt_param_get(term, 0, 0); + + /* + * Request DEC private mode (DECRQM) + * Reply: + * 0 - not recognized + * 1 - set + * 2 - reset + * 3 - permanently set + * 4 - permantently reset + */ + char reply[32]; + snprintf(reply, sizeof(reply), "\033[?%u;2$y", param); + vt_to_slave(term, reply, strlen(reply)); + break; + } + case 's': for (size_t i = 0; i < term->vt.params.idx; i++) { switch (term->vt.params.v[i].value) { |
