summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2023-09-08 06:52:31 +0000
committernicm <nicm>2023-09-08 06:52:31 +0000
commit4872811ba78bd68c71d40b820065c093ed427970 (patch)
treecc341711310c09a22f6e3ef795c7292fe67074f7 /tty-keys.c
parent9653a52a6a406a9c0b665bea5b706b571c6117be (diff)
Use DECSLRM and DECFRA only at level 4 rather than checking the terminal
id.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 3a8b779e..3ad80c3d 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1315,15 +1315,21 @@ tty_keys_device_attributes(struct tty *tty, const char *buf, size_t len,
}
/*
- * Add terminal features. Technically, VT420 and VT525 do not support
- * SIXEL, but some modern terminals report it anyway so we accept it
- * here too.
+ * Add terminal features. Hardware level 5 does not offer SIXEL but
+ * some terminal emulators report it anyway and it does not harm
+ * to check it here.
+ *
+ * DECSLRM and DECFRA should be supported by level 5 as well as level
+ * 4, but VTE has rather ruined it by advertising level 5 despite not
+ * supporting them.
*/
switch (p[0]) {
- case 62: /* VT220 */
- case 63: /* VT320 */
- case 64: /* VT420 */
- case 65: /* VT525 */
+ case 64: /* level 4 */
+ tty_add_features(features, "margins,rectfill", ",");
+ /* FALLTHROUGH */
+ case 62: /* level 2 */
+ case 63: /* level 3 */
+ case 65: /* level 5 */
for (i = 1; i < n; i++) {
log_debug("%s: DA feature: %d", c->name, p[i]);
if (p[i] == 4)
@@ -1395,12 +1401,6 @@ tty_keys_device_attributes2(struct tty *tty, const char *buf, size_t len,
/* Add terminal features. */
switch (p[0]) {
- case 41: /* VT420 */
- case 61: /* VT510 */
- case 64: /* VT520 */
- case 65: /* VT525 */
- tty_add_features(features, "margins,rectfill", ",");
- break;
case 'M': /* mintty */
tty_default_features(features, "mintty", 0);
break;