mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 12:48:56 +00:00
Move the UTF-8 flag to terminal flags.
This commit is contained in:
parent
4744aa43af
commit
5ec80bd249
2
format.c
2
format.c
@ -2569,7 +2569,7 @@ format_defaults_client(struct format_tree *ft, struct client *c)
|
||||
format_add(ft, "client_prefix", "%d", 1);
|
||||
format_add(ft, "client_key_table", "%s", c->keytable->name);
|
||||
|
||||
if (tty->flags & TTY_UTF8)
|
||||
if (tty_get_flags(tty) & TERM_UTF8)
|
||||
format_add(ft, "client_utf8", "%d", 1);
|
||||
else
|
||||
format_add(ft, "client_utf8", "%d", 0);
|
||||
|
@ -2056,7 +2056,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
|
||||
c->fd = -1;
|
||||
} else {
|
||||
if (c->flags & CLIENT_UTF8)
|
||||
c->tty.flags |= TTY_UTF8;
|
||||
c->tty.term_flags |= TERM_UTF8;
|
||||
if (c->flags & CLIENT_256COLOURS)
|
||||
c->tty.term_flags |= TERM_256COLOURS;
|
||||
tty_resize(&c->tty);
|
||||
|
3
tmux.h
3
tmux.h
@ -1183,6 +1183,7 @@ struct tty_term {
|
||||
#define TERM_DECFRA 0x8
|
||||
#define TERM_RGBCOLOURS 0x10
|
||||
#define TERM_SYNC 0x20
|
||||
#define TERM_UTF8 0x40
|
||||
int flags;
|
||||
|
||||
LIST_ENTRY(tty_term) entry;
|
||||
@ -1235,7 +1236,7 @@ struct tty {
|
||||
#define TTY_NOCURSOR 0x1
|
||||
#define TTY_FREEZE 0x2
|
||||
#define TTY_TIMER 0x4
|
||||
#define TTY_UTF8 0x8
|
||||
/* 0x8 unused */
|
||||
#define TTY_STARTED 0x10
|
||||
#define TTY_OPENED 0x20
|
||||
#define TTY_FOCUS 0x40
|
||||
|
@ -99,7 +99,7 @@ tty_acs_needed(struct tty *tty)
|
||||
tty_term_number(tty->term, TTYC_U8) == 0)
|
||||
return (1);
|
||||
|
||||
if (tty->flags & TTY_UTF8)
|
||||
if (tty_get_flags(tty) & TERM_UTF8)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user