csi: ?r and ?s are like ?h and ?l; they save/restore things

Assuming ncmpcpp is correct, ?1001s and ?1001r saves and restores the
'highlight mouse tracking' mode.
This commit is contained in:
Daniel Eklöf 2019-07-03 21:33:23 +02:00
parent 3c67628c57
commit 3d58d24963
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

33
csi.c
View file

@ -715,14 +715,39 @@ csi_dispatch(struct terminal *term, uint8_t final)
}
case 's':
for (size_t i = 0; i < term->vt.params.idx; i++) {
switch (term->vt.params.v[i].value) {
case 1001: /* save old highlight mouse tracking mode? */
LOG_WARN(
"unimplemented: CSI ?1001s "
"(save 'highlight mouse tracking' mode)");
break;
default:
LOG_ERR("unimplemented: CSI ?%ds", term->vt.params.v[i].value);
abort();
}
}
break;
case 'r':
/* ??? */
/* Seen with ncmpcpp */
LOG_WARN("unimplemented: CSI ?%c", final);
for (size_t i = 0; i < term->vt.params.idx; i++) {
switch (term->vt.params.v[i].value) {
case 1001: /* restore old highlight mouse tracking mode? */
LOG_WARN(
"unimplemented: CSI ?1001r "
"(restore 'highlight mouse tracking' mode)");
break;
default:
LOG_ERR("unimplemented: CSI ?%dr", term->vt.params.v[i].value);
abort();
}
}
break;
default:
LOG_ERR("CSI: intermediate '?': unimplemented final: %c", final);
LOG_ERR("unimplemented: CSI: ?%c", final);
abort();
}