diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-12-16 23:05:52 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-12-16 23:05:52 +0800 |
commit | f59f81c32e901b5f6990bbe0b5608c073c0b1b9c (patch) | |
tree | e73f52d79b13649741f59110b0a5416a83fbd366 /src/nvim/mbyte.c | |
parent | 56fa08b458cbf98fa83c21c3e683f8e7e91a334f (diff) | |
download | rneovim-f59f81c32e901b5f6990bbe0b5608c073c0b1b9c.tar.gz rneovim-f59f81c32e901b5f6990bbe0b5608c073c0b1b9c.tar.bz2 rneovim-f59f81c32e901b5f6990bbe0b5608c073c0b1b9c.zip |
vim-patch:8.2.3825: various comments could be improved
Problem: Various comments could be improved.
Solution: Improve the comments.
https://github.com/vim/vim/commit/52797bae1710621926c03a2611c40a692c96fb44
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index ce44f6c619..5eb209a6f6 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1609,7 +1609,8 @@ void show_utf8(void) msg((char *)IObuff); } -/// Return offset from "p" to the first byte of the character it points into. +/// Return offset from "p" to the start of a character, including composing characters. +/// "base" must be the start of the string, which must be NUL terminated. /// If "p" points to the NUL at the end of the string return 0. /// Returns 0 when already at the first byte of a character. int utf_head_off(const char_u *base, const char_u *p) @@ -1850,10 +1851,9 @@ int mb_off_next(char_u *base, char_u *p) return i; } -/* - * Return the offset from "p" to the last byte of the character it points - * into. Can start anywhere in a stream of bytes. - */ +/// Return the offset from "p" to the last byte of the character it points +/// into. Can start anywhere in a stream of bytes. +/// Composing characters are not included. int mb_tail_off(char_u *base, char_u *p) { int i; |