refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len

This commit is contained in:
Björn Linse
2021-11-14 12:40:46 +01:00
parent 9f27e6cbe7
commit 0039ba04b0
25 changed files with 65 additions and 66 deletions

View File

@@ -2024,7 +2024,7 @@ static int count_syllables(slang_T *slang, const char_u *word)
} else {
// No recognized syllable item, at least a syllable char then?
c = utf_ptr2char(p);
len = (*mb_ptr2len)(p);
len = utfc_ptr2len(p);
if (vim_strchr(slang->sl_syllable, c) == NULL) {
skip = false; // No, search for next syllable
} else if (!skip) {
@@ -4008,7 +4008,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
c = su->su_badflags;
if ((c & WF_ALLCAP)
&& su->su_badlen ==
(*mb_ptr2len)(su->su_badptr)) {
utfc_ptr2len(su->su_badptr)) {
c = WF_ONECAP;
}
c |= flags;
@@ -6936,7 +6936,7 @@ void spell_dump_compl(char_u *pat, int ic, Direction *dir, int dumpflags_arg)
if (n == WF_ONECAP) {
dumpflags |= DUMPFLAG_ONECAP;
} else if (n == WF_ALLCAP
&& (int)STRLEN(pat) > mb_ptr2len(pat)) {
&& (int)STRLEN(pat) > utfc_ptr2len(pat)) {
dumpflags |= DUMPFLAG_ALLCAP;
}
}