aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-03 19:33:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-03 19:33:23 +0000
commit3d58d24963645125f23316be01f936932f88ee4a (patch)
tree5fbccefd8b7d6f8842bfb7a1051057ac80c78e1c
parentvt: implement (untested!) smam and rmam (auto margins) (diff)
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.
-rw-r--r--csi.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/csi.c b/csi.c
index bb805134..170cbf6d 100644
--- a/csi.c
+++ b/csi.c
@@ -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();
}