Merge #5855 from lonerover/vim-7.4.2019

vim-patch:7.4.2019,7.4.2028
This commit is contained in:
Justin M. Keyes 2017-01-01 16:30:21 +01:00 committed by GitHub
commit 57ce8b5648
2 changed files with 11 additions and 6 deletions

View File

@ -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;

View File

@ -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