summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/format.c4
-rw-r--r--usr.bin/tmux/server-client.c4
-rw-r--r--usr.bin/tmux/tmux.h5
-rw-r--r--usr.bin/tmux/tty-acs.c4
-rw-r--r--usr.bin/tmux/tty.c4
5 files changed, 11 insertions, 10 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 521b9eb1704..ce5d8a774bd 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.241 2020/04/13 20:51:57 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.242 2020/04/16 14:25:35 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 1834965f9b8..2ae2a0d4e32 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.318 2020/04/13 15:55:51 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.319 2020/04/16 14:25:35 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 0f33725a197..66753c75794 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.997 2020/04/16 14:03:51 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.998 2020/04/16 14:25:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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/usr.bin/tmux/tty-acs.c b/usr.bin/tmux/tty-acs.c
index 805b96b6d25..6cc369f0fe8 100644
--- a/usr.bin/tmux/tty-acs.c
+++ b/usr.bin/tmux/tty-acs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-acs.c,v 1.7 2019/05/17 05:48:25 nicm Exp $ */
+/* $OpenBSD: tty-acs.c,v 1.8 2020/04/16 14:25:35 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 7a4d1606909..38c81ecea9a 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.349 2020/04/16 14:03:51 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.350 2020/04/16 14:25:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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. */