summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-10 18:24:27 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-10 18:24:27 +0200
commitc4a927ca8dc383190d5df2cacd3f966698b6190c (patch)
tree0a81c918cb5fa69ed8f90b8365db247353c442a7
parentb25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6 (diff)
patch 7.4.2019v7.4.2019
Problem: When ignoring case utf_fold() may consume a lot of time. Solution: Optimize for ASCII.
-rw-r--r--src/mbyte.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 49057000ff..7bc184ba24 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));
}
diff --git a/src/version.c b/src/version.c
index 7317edf217..8013b459d4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2019,
+/**/
2018,
/**/
2017,