refactor(mbyte.c): add const qualifiers

This only touches functions that do not return a pointer.
Also add a note about the differences between mb_head_off() and utf_head_off().
This commit is contained in:
zeertzjq
2022-02-09 09:52:57 +08:00
parent e16ec0be22
commit ff81725ff0
3 changed files with 19 additions and 26 deletions

View File

@@ -566,7 +566,7 @@ static void block_insert(oparg_T *oap, char_u *s, int b_insert, struct block_def
if (b_insert) {
off = utf_head_off(oldp, oldp + offset + spaces);
} else {
off = (*mb_off_next)(oldp, oldp + offset);
off = mb_off_next(oldp, oldp + offset);
offset += off;
}
spaces -= off;