diff options
author | nicm <nicm> | 2020-04-16 14:25:35 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-16 14:25:35 +0000 |
commit | 5ec80bd249a37147207ec2ef420086336ccf78a8 (patch) | |
tree | 28707a55749d2d2c7cf7397c379c7376540cb8ea | |
parent | 4744aa43af47815a9c4c110cceb3959b1662e54b (diff) | |
download | rtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.tar.gz rtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.tar.bz2 rtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.zip |
Move the UTF-8 flag to terminal flags.
-rw-r--r-- | format.c | 2 | ||||
-rw-r--r-- | server-client.c | 2 | ||||
-rw-r--r-- | tmux.h | 3 | ||||
-rw-r--r-- | tty-acs.c | 2 | ||||
-rw-r--r-- | tty.c | 2 |
5 files changed, 6 insertions, 5 deletions
@@ -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); diff --git a/server-client.c b/server-client.c index 8042da9a..1b27ae20 100644 --- a/server-client.c +++ b/server-client.c @@ -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); @@ -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); } @@ -1255,7 +1255,7 @@ tty_check_codeset(struct tty *tty, const struct grid_cell *gc) return (gc); /* UTF-8 terminal and a UTF-8 character - fine. */ - if (tty->flags & TTY_UTF8) + if (tty_get_flags(tty) & TERM_UTF8) return (gc); /* Replace by the right number of underscores. */ |