mirror of
https://github.com/tmux/tmux.git
synced 2025-01-15 05:09:04 +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_prefix", "%d", 1);
|
||||||
format_add(ft, "client_key_table", "%s", c->keytable->name);
|
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);
|
format_add(ft, "client_utf8", "%d", 1);
|
||||||
else
|
else
|
||||||
format_add(ft, "client_utf8", "%d", 0);
|
format_add(ft, "client_utf8", "%d", 0);
|
||||||
|
@ -2056,7 +2056,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
|
|||||||
c->fd = -1;
|
c->fd = -1;
|
||||||
} else {
|
} else {
|
||||||
if (c->flags & CLIENT_UTF8)
|
if (c->flags & CLIENT_UTF8)
|
||||||
c->tty.flags |= TTY_UTF8;
|
c->tty.term_flags |= TERM_UTF8;
|
||||||
if (c->flags & CLIENT_256COLOURS)
|
if (c->flags & CLIENT_256COLOURS)
|
||||||
c->tty.term_flags |= TERM_256COLOURS;
|
c->tty.term_flags |= TERM_256COLOURS;
|
||||||
tty_resize(&c->tty);
|
tty_resize(&c->tty);
|
||||||
|
3
tmux.h
3
tmux.h
@ -1183,6 +1183,7 @@ struct tty_term {
|
|||||||
#define TERM_DECFRA 0x8
|
#define TERM_DECFRA 0x8
|
||||||
#define TERM_RGBCOLOURS 0x10
|
#define TERM_RGBCOLOURS 0x10
|
||||||
#define TERM_SYNC 0x20
|
#define TERM_SYNC 0x20
|
||||||
|
#define TERM_UTF8 0x40
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
LIST_ENTRY(tty_term) entry;
|
LIST_ENTRY(tty_term) entry;
|
||||||
@ -1235,7 +1236,7 @@ struct tty {
|
|||||||
#define TTY_NOCURSOR 0x1
|
#define TTY_NOCURSOR 0x1
|
||||||
#define TTY_FREEZE 0x2
|
#define TTY_FREEZE 0x2
|
||||||
#define TTY_TIMER 0x4
|
#define TTY_TIMER 0x4
|
||||||
#define TTY_UTF8 0x8
|
/* 0x8 unused */
|
||||||
#define TTY_STARTED 0x10
|
#define TTY_STARTED 0x10
|
||||||
#define TTY_OPENED 0x20
|
#define TTY_OPENED 0x20
|
||||||
#define TTY_FOCUS 0x40
|
#define TTY_FOCUS 0x40
|
||||||
|
@ -99,7 +99,7 @@ tty_acs_needed(struct tty *tty)
|
|||||||
tty_term_number(tty->term, TTYC_U8) == 0)
|
tty_term_number(tty->term, TTYC_U8) == 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
if (tty->flags & TTY_UTF8)
|
if (tty_get_flags(tty) & TERM_UTF8)
|
||||||
return (0);
|
return (0);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
2
tty.c
2
tty.c
@ -1255,7 +1255,7 @@ tty_check_codeset(struct tty *tty, const struct grid_cell *gc)
|
|||||||
return (gc);
|
return (gc);
|
||||||
|
|
||||||
/* UTF-8 terminal and a UTF-8 character - fine. */
|
/* UTF-8 terminal and a UTF-8 character - fine. */
|
||||||
if (tty->flags & TTY_UTF8)
|
if (tty_get_flags(tty) & TERM_UTF8)
|
||||||
return (gc);
|
return (gc);
|
||||||
|
|
||||||
/* Replace by the right number of underscores. */
|
/* Replace by the right number of underscores. */
|
||||||
|
Loading…
Reference in New Issue
Block a user