diff options
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 2278de626..33c0fdf7a 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -2408,6 +2408,21 @@ utf_head_off(base, p) } /* + * Copy a character from "*fp" to "*tp" and advance the pointers. + */ + void +mb_copy_char(fp, tp) + char_u **fp; + char_u **tp; +{ + int l = (*mb_ptr2len_check)(*fp); + + mch_memmove(*tp, *fp, (size_t)l); + *tp += l; + *fp += l; +} + +/* * Return the offset from "p" to the first byte of a character. When "p" is * at the start of a character 0 is returned, otherwise the offset to the next * character. Can start anywhere in a stream of bytes. |