diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-10 18:24:27 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-10 18:24:27 +0200 |
commit | c4a927ca8dc383190d5df2cacd3f966698b6190c (patch) | |
tree | 0a81c918cb5fa69ed8f90b8365db247353c442a7 /src/mbyte.c | |
parent | b25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6 (diff) | |
download | vim-git-c4a927ca8dc383190d5df2cacd3f966698b6190c.tar.gz |
patch 7.4.2019v7.4.2019
Problem: When ignoring case utf_fold() may consume a lot of time.
Solution: Optimize for ASCII.
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 49057000f..7bc184ba2 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -3067,6 +3067,9 @@ utf_convert( 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, (int)sizeof(foldCase)); } |