mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
vim-patch:8.1.2120: some MB_ macros are more complicated than necessary
Problem: Some MB_ macros are more complicated than necessary. (Dominique
Pelle)
Solution: Simplify the macros. Expand inline.
1614a14901
This commit is contained in:
@@ -724,7 +724,7 @@ static int diff_write_buffer(buf_T *buf, diffin_T *din)
|
||||
|
||||
c = PTR2CHAR(s);
|
||||
c = enc_utf8 ? utf_fold(c) : TOLOWER_LOC(c);
|
||||
orig_len = MB_PTR2LEN(s);
|
||||
orig_len = utfc_ptr2len(s);
|
||||
if (utf_char2bytes(c, cbuf) != orig_len) {
|
||||
// TODO(Bram): handle byte length difference
|
||||
memmove(ptr + len, s, orig_len);
|
||||
|
Reference in New Issue
Block a user