mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
ops: fix i<c-r> with multi-byte text (#6524)
This commit is contained in:

committed by
Justin M. Keyes

parent
58d2ce9bdb
commit
12fc1defd6
@@ -302,13 +302,13 @@ static void add_num_buff(buffheader_T *buf, long n)
|
||||
*/
|
||||
static void add_char_buff(buffheader_T *buf, int c)
|
||||
{
|
||||
char bytes[MB_MAXBYTES + 1];
|
||||
uint8_t bytes[MB_MAXBYTES + 1];
|
||||
|
||||
int len;
|
||||
if (IS_SPECIAL(c)) {
|
||||
len = 1;
|
||||
} else {
|
||||
len = (*mb_char2bytes)(c, (char_u *)bytes);
|
||||
len = mb_char2bytes(c, bytes);
|
||||
}
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
|
Reference in New Issue
Block a user