version 1.125, 2020/04/17 09:06:10 |
version 1.126, 2020/04/20 13:25:36 |
|
|
struct client *c = tty->client; |
struct client *c = tty->client; |
u_int i, n = 0; |
u_int i, n = 0; |
char tmp[64], *endptr, p[32] = { 0 }, *cp, *next; |
char tmp[64], *endptr, p[32] = { 0 }, *cp, *next; |
int flags = 0; |
|
|
|
*size = 0; |
*size = 0; |
if (tty->flags & TTY_HAVEDA) |
if (tty->flags & TTY_HAVEDA) |
|
|
n++; |
n++; |
} |
} |
|
|
/* Set terminal flags. */ |
/* Add terminal features. */ |
switch (p[0]) { |
switch (p[0]) { |
case 41: /* VT420 */ |
case 41: /* VT420 */ |
flags |= (TERM_DECFRA|TERM_DECSLRM); |
tty_add_features(&c->term_features, |
|
"margins," |
|
"rectfill", |
|
","); |
break; |
break; |
case 'M': /* mintty */ |
case 'M': /* mintty */ |
flags |= (TERM_256COLOURS|TERM_RGBCOLOURS); |
tty_add_features(&c->term_features, |
|
"256," |
|
"RGB," |
|
"title", |
|
","); |
break; |
break; |
case 'T': /* tmux - new versons reply to DSR which will set RGB */ |
case 'T': /* tmux */ |
flags |= (TERM_UTF8|TERM_256COLOURS); |
tty_add_features(&c->term_features, |
|
"256," |
|
"RGB," |
|
"ccolour," |
|
"cstyle," |
|
"overline," |
|
"title," |
|
"usstyle", |
|
","); |
break; |
break; |
case 'U': /* rxvt-unicode */ |
case 'U': /* rxvt-unicode */ |
flags |= (TERM_UTF8); |
tty_add_features(&c->term_features, |
|
"256," |
|
"title", |
|
","); |
break; |
break; |
} |
} |
log_debug("%s: received secondary DA %.*s", c->name, (int)*size, buf); |
log_debug("%s: received secondary DA %.*s", c->name, (int)*size, buf); |
|
|
tty_set_flags(tty, flags); |
tty_update_features(tty); |
tty->flags |= TTY_HAVEDA; |
tty->flags |= TTY_HAVEDA; |
|
|
return (0); |
return (0); |
|
|
struct client *c = tty->client; |
struct client *c = tty->client; |
u_int i; |
u_int i; |
char tmp[64]; |
char tmp[64]; |
int flags = 0; |
|
|
|
*size = 0; |
*size = 0; |
if (tty->flags & TTY_HAVEDSR) |
if (tty->flags & TTY_HAVEDSR) |
|
|
tmp[i] = '\0'; |
tmp[i] = '\0'; |
*size = 3 + i; |
*size = 3 + i; |
|
|
/* Set terminal flags. */ |
/* Add terminal features. */ |
if (strncmp(tmp, "ITERM2 ", 7) == 0) { |
if (strncmp(tmp, "ITERM2 ", 7) == 0) { |
flags |= (TERM_UTF8|TERM_DECSLRM|TERM_SYNC|TERM_256COLOURS| |
tty_add_features(&c->term_features, |
TERM_RGBCOLOURS); |
"256," |
} else if (strncmp(tmp, "TMUX ", 5) == 0) |
"RGB," |
flags |= (TERM_UTF8|TERM_256COLOURS|TERM_RGBCOLOURS); |
"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 DSR %.*s", c->name, (int)*size, buf); |
log_debug("%s: received DSR %.*s", c->name, (int)*size, buf); |
|
|
tty_set_flags(tty, flags); |
tty_update_features(tty); |
tty->flags |= TTY_HAVEDSR; |
tty->flags |= TTY_HAVEDSR; |
|
|
return (0); |
return (0); |