aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testing.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-17 14:17:40 +0100
committerGitHub <noreply@github.com>2023-01-17 21:17:40 +0800
commit0344bfad0fc87d2e256ea2b80de7abd069ba1dd2 (patch)
treee42d0318ed1e684bbb468661d8a1fbfe82e819ee /src/nvim/testing.c
parent99186508d9a1b7536441112f9bbe48690592b5d7 (diff)
downloadrneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.gz
rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.bz2
rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.zip
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/testing.c')
-rw-r--r--src/nvim/testing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/testing.c b/src/nvim/testing.c
index edb24c6dc5..e9bad2a0b3 100644
--- a/src/nvim/testing.c
+++ b/src/nvim/testing.c
@@ -119,10 +119,10 @@ static void ga_concat_shorten_esc(garray_T *gap, const char_u *str)
for (const char_u *p = str; *p != NUL; p++) {
int same_len = 1;
- const char_u *s = p;
+ const char *s = (char *)p;
const int c = mb_ptr2char_adv(&s);
- const int clen = (int)(s - p);
- while (*s != NUL && c == utf_ptr2char((char *)s)) {
+ const int clen = (int)((char_u *)s - p);
+ while (*s != NUL && c == utf_ptr2char(s)) {
same_len++;
s += clen;
}
@@ -133,7 +133,7 @@ static void ga_concat_shorten_esc(garray_T *gap, const char_u *str)
vim_snprintf((char *)buf, NUMBUFLEN, "%d", same_len);
ga_concat(gap, (char *)buf);
ga_concat(gap, " times]");
- p = s - 1;
+ p = (char_u *)s - 1;
} else {
ga_concat_esc(gap, p, clen);
}