mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
57ce8b5648
@ -1315,6 +1315,10 @@ static int utf_convert(int a, const convertStruct *const table, size_t n_items)
|
||||
*/
|
||||
int utf_fold(int a)
|
||||
{
|
||||
if (a < 0x80) {
|
||||
// be fast for ASCII
|
||||
return a >= 0x41 && a <= 0x5a ? a + 32 : a;
|
||||
}
|
||||
return utf_convert(a, foldCase, ARRAY_SIZE(foldCase));
|
||||
}
|
||||
|
||||
@ -2105,13 +2109,14 @@ char_u * enc_locale(void)
|
||||
} else
|
||||
s = p + 1;
|
||||
}
|
||||
for (i = 0; s[i] != NUL && i < (int)sizeof(buf) - 1; ++i) {
|
||||
if (s[i] == '_' || s[i] == '-')
|
||||
for (i = 0; i < (int)sizeof(buf) - 1 && s[i] != NUL; i++) {
|
||||
if (s[i] == '_' || s[i] == '-') {
|
||||
buf[i] = '-';
|
||||
else if (isalnum((int)s[i]))
|
||||
} else if (isalnum((int)s[i])) {
|
||||
buf[i] = TOLOWER_ASC(s[i]);
|
||||
else
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
buf[i] = NUL;
|
||||
|
||||
|
@ -412,7 +412,7 @@ static int included_patches[] = {
|
||||
// 2031,
|
||||
// 2030 NA
|
||||
// 2029,
|
||||
// 2028,
|
||||
2028,
|
||||
// 2027 NA
|
||||
// 2026 NA
|
||||
// 2025 NA
|
||||
@ -421,7 +421,7 @@ static int included_patches[] = {
|
||||
// 2022,
|
||||
// 2021,
|
||||
// 2020 NA
|
||||
// 2019,
|
||||
2019,
|
||||
// 2018,
|
||||
// 2017,
|
||||
// 2016 NA
|
||||
|
Loading…
Reference in New Issue
Block a user