1
0
forked from aniani/vim

patch 9.1.0666: assert_equal() doesn't show multibyte string correctly

Problem:  assert_equal() doesn't show multibyte string correctly
Solution: Properly advance over a multibyte char.
          (zeertzjq)

closes: #15456

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-08-09 19:52:10 +02:00
committed by Christian Brabandt
parent 0cc5dce578
commit 9c4b2462bb
3 changed files with 16 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ ga_concat_shorten_esc(garray_T *gap, char_u *str)
return;
}
for (p = str; *p != NUL; ++p)
for (p = str; *p != NUL; )
{
same_len = 1;
s = p;
@@ -118,10 +118,13 @@ ga_concat_shorten_esc(garray_T *gap, char_u *str)
vim_snprintf((char *)buf, NUMBUFLEN, "%d", same_len);
ga_concat(gap, buf);
ga_concat(gap, (char_u *)" times]");
p = s - 1;
p = s;
}
else
{
ga_concat_esc(gap, p, clen);
p += clen;
}
}
}