1
0
forked from aniani/vim

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

@@ -93,6 +93,7 @@
#define MB_ISUPPER(c) vim_isupper(c)
#define MB_TOLOWER(c) vim_tolower(c)
#define MB_TOUPPER(c) vim_toupper(c)
#define MB_CASEFOLD(c) (enc_utf8 ? utf_fold(c) : MB_TOLOWER(c))
// Use our own isdigit() replacement, because on MS-Windows isdigit() returns
// non-zero for superscript 1. Also avoids that isdigit() crashes for numbers