aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-01-13 14:46:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-01-14 12:52:42 +0000
commit7243b094b7a1885b898b12464276c07b95c01bf2 (patch)
treeefa5ecf55b4bbdd86f92e83fd209eded563cb045
parentdcs: decrqss: BUG on invalid cursor style (diff)
dcs: decrqss: add note about Ps in the reply
-rw-r--r--dcs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/dcs.c b/dcs.c
index b0d111b7..e99e2d7b 100644
--- a/dcs.c
+++ b/dcs.c
@@ -219,6 +219,17 @@ decrqss(struct terminal *term)
const uint8_t *query = term->vt.dcs.data;
const size_t n = term->vt.dcs.idx;
+ /*
+ * A note on the Ps parameter in the reply: many DEC manual
+ * instances (e.g. https://vt100.net/docs/vt510-rm/DECRPSS) claim
+ * that 0 means “request is valid”, and 1 means “request is
+ * invalid”.
+ *
+ * However, this appears to be a typo; actual hardware inverts the
+ * response (as does XTerm and mlterm):
+ * https://github.com/hackerb9/vt340test/issues/13
+ */
+
if (memcmp(query, "r", n) == 0) {
/* DECSTBM - Set Top and Bottom Margins */
char reply[64];