diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2023-09-08 06:52:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2023-09-08 06:52:32 +0000 |
commit | 752f1b15426039ca64c06002891d2f442dca0771 (patch) | |
tree | 33adfa9e22bf2186b86df7cdeb5a533ab45e80ea /usr.bin/tmux | |
parent | 368ae2d8892ffc5a1e8eb05e6af9833ce5d7e794 (diff) |
Use DECSLRM and DECFRA only at level 4 rather than checking the terminal
id.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/format.c | 7 | ||||
-rw-r--r-- | usr.bin/tmux/tty-keys.c | 28 |
2 files changed, 17 insertions, 18 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 430bb3565e6..2377697bcba 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.317 2023/08/17 14:10:28 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.318 2023/09/08 06:52:31 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1126,7 +1126,6 @@ format_cb_mouse_word(struct format_tree *ft) struct window_pane *wp; struct grid *gd; u_int x, y; - char *s; if (!ft->m.valid) return (NULL); @@ -1139,7 +1138,7 @@ format_cb_mouse_word(struct format_tree *ft) if (!TAILQ_EMPTY(&wp->modes)) { if (TAILQ_FIRST(&wp->modes)->mode == &window_copy_mode || TAILQ_FIRST(&wp->modes)->mode == &window_view_mode) - return (s = window_copy_get_word(wp, x, y)); + return (window_copy_get_word(wp, x, y)); return (NULL); } gd = wp->base.grid; @@ -4185,7 +4184,7 @@ static char * format_loop_clients(struct format_expand_state *es, const char *fmt) { struct format_tree *ft = es->ft; - struct client *c = ft->client; + struct client *c; struct cmdq_item *item = ft->item; struct format_tree *nft; struct format_expand_state next; diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c index 63d9eca5908..539c94acc6b 100644 --- a/usr.bin/tmux/tty-keys.c +++ b/usr.bin/tmux/tty-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-keys.c,v 1.170 2023/09/07 10:21:46 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.171 2023/09/08 06:52:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |