summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-20 17:33:33 +0000
committernicm <nicm@openbsd.org>2009-10-20 17:33:33 +0000
commite91c0c387a3b51d3c240f8ca2e1a9ecbfc770800 (patch)
tree6d828cd9bb274f9be0bfda47a39b7f9a631f36a1 /usr.bin/tmux/tmux.h
parentMove the check for whether to force a line wrapper lower down into the tty code (diff)
downloadwireguard-openbsd-e91c0c387a3b51d3c240f8ca2e1a9ecbfc770800.tar.xz
wireguard-openbsd-e91c0c387a3b51d3c240f8ca2e1a9ecbfc770800.zip
UTF-8 combined character fixes.
Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the UTF-8 cell data size to 9 and alter the code to allow this. Also break off the combining code into a separate function, handle any further combining beyond the buffer size by replacing the character with _s, and when redrawing the UTF-8 character don't assume the first part has just been printed, redraw the entire line.
Diffstat (limited to '')
-rw-r--r--usr.bin/tmux/tmux.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 110db121310..42883a584a8 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.141 2009/10/20 14:22:57 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.142 2009/10/20 17:33:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -516,7 +516,7 @@ struct grid_cell {
} __packed;
/* Grid cell UTF-8 data. Used instead of data in grid_cell for UTF-8 cells. */
-#define UTF8_SIZE 8
+#define UTF8_SIZE 9
struct grid_utf8 {
u_char width;
u_char data[UTF8_SIZE];