mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
csi: implement "send device attributes"
This commit is contained in:
parent
722c2e7ed2
commit
86519f93ba
1 changed files with 21 additions and 0 deletions
21
csi.c
21
csi.c
|
|
@ -657,6 +657,27 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
return true;
|
||||
}
|
||||
|
||||
else if (term->vt.intermediates.idx == 1 &&
|
||||
term->vt.intermediates.data[0] == '>') {
|
||||
switch (final) {
|
||||
case 'c': {
|
||||
int param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 0;
|
||||
if (param != 0) {
|
||||
LOG_ERR(
|
||||
"unimplemented: send device attributes with param = %d",
|
||||
param);
|
||||
return false;
|
||||
}
|
||||
|
||||
return write(term->ptmx, "\033[?6c", 5) == 5;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_ERR("CSI: intermediate '>': unimplemented final: %c", final);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
LOG_ERR("CSI: unimplemented: intermediates: %.*s",
|
||||
(int)term->vt.intermediates.idx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue