diff options
author | nicm <nicm> | 2016-03-02 15:36:02 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-03-02 15:36:02 +0000 |
commit | b8a102d26f41e57b94359627a4df8f22af10c6fa (patch) | |
tree | 43730f925370a2d77bf64e817cb77bfaf4849dc5 /tmux.h | |
parent | d980d965ddb6165bd801351892fed2497204a279 (diff) | |
download | rtmux-b8a102d26f41e57b94359627a4df8f22af10c6fa.tar.gz rtmux-b8a102d26f41e57b94359627a4df8f22af10c6fa.tar.bz2 rtmux-b8a102d26f41e57b94359627a4df8f22af10c6fa.zip |
Handle wcwidth() and mbtowc() failures in better style and drop
characters where we can't find the width (wcwidth() fails) on input, the
same as we drop invalid UTF-8. Suggested by schwarze@.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -2316,8 +2316,7 @@ void utf8_set(struct utf8_data *, u_char); void utf8_copy(struct utf8_data *, const struct utf8_data *); enum utf8_state utf8_open(struct utf8_data *, u_char); enum utf8_state utf8_append(struct utf8_data *, u_char); -u_int utf8_width(wchar_t); -wchar_t utf8_combine(const struct utf8_data *); +enum utf8_state utf8_combine(const struct utf8_data *, wchar_t *); enum utf8_state utf8_split(wchar_t, struct utf8_data *); int utf8_strvis(char *, const char *, size_t, int); char *utf8_sanitize(const char *); |