]> granicus.if.org Git - vim/commitdiff
patch 7.4.2019 v7.4.2019
authorBram Moolenaar <Bram@vim.org>
Sun, 10 Jul 2016 16:24:27 +0000 (18:24 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Jul 2016 16:24:27 +0000 (18:24 +0200)
Problem:    When ignoring case utf_fold() may consume a lot of time.
Solution:   Optimize for ASCII.

src/mbyte.c
src/version.c

index 49057000ff986579c1e5ec91b507bdcd4fbb871d..7bc184ba240b186b9a0c35fcd2753225f349e04d 100644 (file)
@@ -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));
 }
 
index 7317edf21792459c173e659cf49699e778d7d916..8013b459d482239dbbcb5ba43fc363f8de56a7bd 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2019,
 /**/
     2018,
 /**/