0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2019-10-06 22:00:13 +02:00
parent 524f3b19ae
commit 1614a14901
18 changed files with 44 additions and 44 deletions

View File

@@ -744,7 +744,7 @@ diff_write_buffer(buf_T *buf, diffin_T *din)
// xdiff doesn't support ignoring case, fold-case the text.
c = PTR2CHAR(s);
c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c);
orig_len = MB_PTR2LEN(s);
orig_len = mb_ptr2len(s);
if (mb_char2bytes(c, cbuf) != orig_len)
// TODO: handle byte length difference
mch_memmove(ptr + len, s, orig_len);