mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2019
Problem: When ignoring case utf_fold() may consume a lot of time.
Solution: Optimize for ASCII.
c4a927ca8d
This commit is contained in:
parent
61d4ca214f
commit
6705652928
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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