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

@@ -8598,8 +8598,8 @@ static void ex_normal(exarg_T *eap)
int len = 0;
// Count the number of characters to be escaped.
for (p = eap->arg; *p != NUL; ++p) {
for (l = (*mb_ptr2len)(p) - 1; l > 0; --l) {
for (p = eap->arg; *p != NUL; p++) {
for (l = utfc_ptr2len(p) - 1; l > 0; l--) {
if (*++p == K_SPECIAL // trailbyte K_SPECIAL or CSI
) {
len += 2;
@@ -8611,7 +8611,7 @@ static void ex_normal(exarg_T *eap)
len = 0;
for (p = eap->arg; *p != NUL; ++p) {
arg[len++] = *p;
for (l = (*mb_ptr2len)(p) - 1; l > 0; --l) {
for (l = utfc_ptr2len(p) - 1; l > 0; l--) {
arg[len++] = *++p;
if (*p == K_SPECIAL) {
arg[len++] = KS_SPECIAL;