Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit f68d35c

Browse files
committed
Merge branch 'obsd-master'
2 parents 1a1290f + c02bc4d commit f68d35c

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

format.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,6 @@ format_cb_mouse_word(struct format_tree *ft)
11261126
struct window_pane *wp;
11271127
struct grid *gd;
11281128
u_int x, y;
1129-
char *s;
11301129

11311130
if (!ft->m.valid)
11321131
return (NULL);
@@ -1139,7 +1138,7 @@ format_cb_mouse_word(struct format_tree *ft)
11391138
if (!TAILQ_EMPTY(&wp->modes)) {
11401139
if (TAILQ_FIRST(&wp->modes)->mode == &window_copy_mode ||
11411140
TAILQ_FIRST(&wp->modes)->mode == &window_view_mode)
1142-
return (s = window_copy_get_word(wp, x, y));
1141+
return (window_copy_get_word(wp, x, y));
11431142
return (NULL);
11441143
}
11451144
gd = wp->base.grid;
@@ -4185,7 +4184,7 @@ static char *
41854184
format_loop_clients(struct format_expand_state *es, const char *fmt)
41864185
{
41874186
struct format_tree *ft = es->ft;
4188-
struct client *c = ft->client;
4187+
struct client *c;
41894188
struct cmdq_item *item = ft->item;
41904189
struct format_tree *nft;
41914190
struct format_expand_state next;

tty-keys.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,15 +1315,21 @@ tty_keys_device_attributes(struct tty *tty, const char *buf, size_t len,
13151315
}
13161316

13171317
/*
1318-
* Add terminal features. Technically, VT420 and VT525 do not support
1319-
* SIXEL, but some modern terminals report it anyway so we accept it
1320-
* here too.
1318+
* Add terminal features. Hardware level 5 does not offer SIXEL but
1319+
* some terminal emulators report it anyway and it does not harm
1320+
* to check it here.
1321+
*
1322+
* DECSLRM and DECFRA should be supported by level 5 as well as level
1323+
* 4, but VTE has rather ruined it by advertising level 5 despite not
1324+
* supporting them.
13211325
*/
13221326
switch (p[0]) {
1323-
case 62: /* VT220 */
1324-
case 63: /* VT320 */
1325-
case 64: /* VT420 */
1326-
case 65: /* VT525 */
1327+
case 64: /* level 4 */
1328+
tty_add_features(features, "margins,rectfill", ",");
1329+
/* FALLTHROUGH */
1330+
case 62: /* level 2 */
1331+
case 63: /* level 3 */
1332+
case 65: /* level 5 */
13271333
for (i = 1; i < n; i++) {
13281334
log_debug("%s: DA feature: %d", c->name, p[i]);
13291335
if (p[i] == 4)
@@ -1393,12 +1399,15 @@ tty_keys_device_attributes2(struct tty *tty, const char *buf, size_t len,
13931399
break;
13941400
}
13951401

1396-
/* Add terminal features. */
1402+
/*
1403+
* Add terminal features. We add DECSLRM and DECFRA for some
1404+
* identification codes here, notably 64 will catch VT520, even though
1405+
* we can't use level 5 from DA because of VTE.
1406+
*/
13971407
switch (p[0]) {
13981408
case 41: /* VT420 */
13991409
case 61: /* VT510 */
14001410
case 64: /* VT520 */
1401-
case 65: /* VT525 */
14021411
tty_add_features(features, "margins,rectfill", ",");
14031412
break;
14041413
case 'M': /* mintty */

0 commit comments

Comments
 (0)