aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2020-04-16 14:25:35 +0000
committernicm <nicm>2020-04-16 14:25:35 +0000
commit5ec80bd249a37147207ec2ef420086336ccf78a8 (patch)
tree28707a55749d2d2c7cf7397c379c7376540cb8ea
parent4744aa43af47815a9c4c110cceb3959b1662e54b (diff)
downloadrtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.tar.gz
rtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.tar.bz2
rtmux-5ec80bd249a37147207ec2ef420086336ccf78a8.zip
Move the UTF-8 flag to terminal flags.
-rw-r--r--format.c2
-rw-r--r--server-client.c2
-rw-r--r--tmux.h3
-rw-r--r--tty-acs.c2
-rw-r--r--tty.c2
5 files changed, 6 insertions, 5 deletions
diff --git a/format.c b/format.c
index fd3b45b9..f2387f7a 100644
--- a/format.c
+++ b/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);
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);
diff --git a/tmux.h b/tmux.h
index dbf3244f..58840108 100644
--- a/tmux.h
+++ b/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
diff --git a/tty-acs.c b/tty-acs.c
index 14634120..f5352d3e 100644
--- a/tty-acs.c
+++ b/tty-acs.c
@@ -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);
}
diff --git a/tty.c b/tty.c
index a068c1a6..239d1cde 100644
--- a/tty.c
+++ b/tty.c
@@ -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. */