=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.129 retrieving revision 1.130 diff -c -r1.129 -r1.130 *** src/usr.bin/tmux/tty-keys.c 2020/05/16 14:18:39 1.129 --- src/usr.bin/tmux/tty-keys.c 2020/05/16 14:30:17 1.130 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.129 2020/05/16 14:18:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.130 2020/05/16 14:30:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1070,1097 **** ","); break; case 'M': /* mintty */ ! tty_add_features(&c->term_features, ! "256," ! "RGB," ! "title", ! ","); break; case 'T': /* tmux */ ! tty_add_features(&c->term_features, ! "256," ! "RGB," ! "ccolour," ! "cstyle," ! "overline," ! "title," ! "usstyle", ! ","); break; case 'U': /* rxvt-unicode */ ! tty_add_features(&c->term_features, ! "256," ! "title", ! ","); break; } log_debug("%s: received secondary DA %.*s", c->name, (int)*size, buf); --- 1070,1082 ---- ","); break; case 'M': /* mintty */ ! tty_default_features(&c->term_features, "mintty", 0); break; case 'T': /* tmux */ ! tty_default_features(&c->term_features, "tmux", 0); break; case 'U': /* rxvt-unicode */ ! tty_default_features(&c->term_features, "rxvt-unicode", 0); break; } log_debug("%s: received secondary DA %.*s", c->name, (int)*size, buf); *************** *** 1112,1118 **** { struct client *c = tty->client; u_int i; ! char tmp[64]; *size = 0; if (tty->flags & TTY_HAVEXDA) --- 1097,1103 ---- { struct client *c = tty->client; u_int i; ! char tmp[128]; *size = 0; if (tty->flags & TTY_HAVEXDA) *************** *** 1150,1177 **** *size = 5 + i; /* Add terminal features. */ ! if (strncmp(tmp, "iTerm2 ", 7) == 0) { ! tty_add_features(&c->term_features, ! "256," ! "RGB," ! "clipboard," ! "cstyle," ! "margins," ! "sync," ! "title", ! ","); ! } else if (strncmp(tmp, "tmux ", 5) == 0) { ! tty_add_features(&c->term_features, ! "256," ! "RGB," ! "ccolour," ! "cstyle," ! "overline," ! "title," ! "usstyle", ! ","); ! } log_debug("%s: received extended DA %.*s", c->name, (int)*size, buf); tty_update_features(tty); tty->flags |= TTY_HAVEXDA; --- 1135,1152 ---- *size = 5 + i; /* Add terminal features. */ ! if (strncmp(tmp, "iTerm2 ", 7) == 0) ! tty_default_features(&c->term_features, "iTerm2", 0); ! else if (strncmp(tmp, "tmux ", 5) == 0) ! tty_default_features(&c->term_features, "tmux", 0); ! else if (strncmp(tmp, "XTerm(", 6) == 0) ! tty_default_features(&c->term_features, "xterm", 0); ! else if (strncmp(tmp, "mintty ", 7) == 0) ! tty_default_features(&c->term_features, "mintty", 0); log_debug("%s: received extended DA %.*s", c->name, (int)*size, buf); + + free(c->term_type); + c->term_type = xstrdup(tmp); tty_update_features(tty); tty->flags |= TTY_HAVEXDA;