diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-21 00:33:12 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-21 00:33:12 +0300 |
commit | d463c9e03a79e981faaaa985b1160c292d08e172 (patch) | |
tree | 8ebfb9bc003f76a6be2d84035c52c6fdd24afbb5 /src/nvim/getchar.c | |
parent | c289986c89dd0189ed8ab709bf2eb822c493542a (diff) | |
parent | 19646a2985e54dfc561a90a70054522afc052a45 (diff) | |
download | rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.gz rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.bz2 rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.zip |
Merge branch 'master' into lazier-arg_errmsg-gettext
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index b83681ad01..9d32df5a68 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + /* * getchar.c * @@ -302,13 +305,13 @@ static void add_num_buff(buffheader_T *buf, long n) */ static void add_char_buff(buffheader_T *buf, int c) { - char bytes[MB_MAXBYTES + 1]; + uint8_t bytes[MB_MAXBYTES + 1]; int len; if (IS_SPECIAL(c)) { len = 1; } else { - len = (*mb_char2bytes)(c, (char_u *)bytes); + len = mb_char2bytes(c, bytes); } for (int i = 0; i < len; i++) { @@ -1849,11 +1852,12 @@ static int vgetorpeek(int advance) mp_match = mp; mp_match_len = keylen; } - } else - /* No match; may have to check for - * termcode at next character. */ - if (max_mlen < mlen) - max_mlen = mlen; + } else { + // No match; may have to check for termcode at next character. + if (max_mlen < mlen) { + max_mlen = mlen; + } + } } } |