0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0938: NFA regexp uses tolower ()to compare ignore-case

Problem:    NFA regexp uses tolower() to compare ignore-case. (Thayne McCombs)
Solution:   Use utf_fold() when possible. (ref. neovim #12456)
This commit is contained in:
Bram Moolenaar
2020-06-09 19:34:54 +02:00
parent dcf59c37d0
commit 59de417b90
5 changed files with 30 additions and 8 deletions

View File

@@ -747,7 +747,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);
c = MB_CASEFOLD(c);
orig_len = mb_ptr2len(s);
if (mb_char2bytes(c, cbuf) != orig_len)
// TODO: handle byte length difference