diff options
author | nicm <nicm> | 2016-10-11 07:11:40 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-11 07:11:40 +0000 |
commit | 8b804fb5894b6717de36c5c9c96f7fd29b14a864 (patch) | |
tree | 74daf8f3e2813818fb408a1fc3e3e96bd818fac9 /tmux.h | |
parent | a81685bfac9d4eac3a7cfd8f8ce13033a46fe01c (diff) | |
download | rtmux-8b804fb5894b6717de36c5c9c96f7fd29b14a864.tar.gz rtmux-8b804fb5894b6717de36c5c9c96f7fd29b14a864.tar.bz2 rtmux-8b804fb5894b6717de36c5c9c96f7fd29b14a864.zip |
Support UTF-8 entry into the command prompt.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1300,7 +1300,7 @@ struct client { TAILQ_HEAD(, message_entry) message_log; char *prompt_string; - char *prompt_buffer; + struct utf8_data *prompt_buffer; size_t prompt_index; int (*prompt_callbackfn)(void *, const char *); void (*prompt_freefn)(void *); @@ -2345,6 +2345,8 @@ 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 *); +size_t utf8_strlen(const struct utf8_data *); +u_int utf8_strwidth(const struct utf8_data *, ssize_t); struct utf8_data *utf8_fromcstr(const char *); char *utf8_tocstr(struct utf8_data *); u_int utf8_cstrwidth(const char *); |