aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2017-03-21 03:21:53 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-07-28 01:27:58 +0200
commitdc685387a3d60e9ea3d09c80c74d4613b618cf14 (patch)
tree76dc55b7f9bf077dd0f16c94d01a23e43663390a /src/nvim/mbyte.c
parente6d54407ba8ce580fbd81cb9389eb9ce4483597b (diff)
downloadrneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.gz
rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.bz2
rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.zip
viml: introduce menu_get() function #6322
menu_get({path}, {modes}). See :h menu_get.
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r--src/nvim/mbyte.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index 2acfb896d8..4440300640 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -932,12 +932,13 @@ int utf_char2len(int c)
return 6;
}
-/*
- * Convert Unicode character "c" to UTF-8 string in "buf[]".
- * Returns the number of bytes.
- * This does not include composing characters.
- */
-int utf_char2bytes(int c, char_u *buf)
+/// Convert Unicode character to UTF-8 string
+///
+/// @param c character to convert to \p buf
+/// @param[out] buf UTF-8 string generated from \p c, does not add \0
+/// @return the number of bytes (between 1 and 6)
+/// @note This does not include composing characters.
+int utf_char2bytes(int c, char_u *const buf)
{
if (c < 0x80) { /* 7 bits */
buf[0] = c;