summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-26 21:39:13 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-26 21:39:13 +0200
commite8aee7dcf9b12becff86e8ce1783a86801c5f9f6 (patch)
treeb3ceba08da625ebd990201630b1d6fead5e7659e /src/regexp.c
parentab3022196ea4f1496e79b8ee85996e31c45d02f1 (diff)
downloadvim-git-e8aee7dcf9b12becff86e8ce1783a86801c5f9f6.tar.gz
patch 7.4.1793v7.4.1793
Problem: Some character classes may differ between systems. On OS/X the regexp test fails. Solution: Make this less dependent on the system. (idea by Kazunobu Kuriyama)
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 733d56425..5f1fc1c15 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2542,12 +2542,12 @@ collection:
}
break;
case CLASS_ALNUM:
- for (cu = 1; cu <= 255; cu++)
+ for (cu = 1; cu < 128; cu++)
if (isalnum(cu))
regmbc(cu);
break;
case CLASS_ALPHA:
- for (cu = 1; cu <= 255; cu++)
+ for (cu = 1; cu < 128; cu++)
if (isalpha(cu))
regmbc(cu);
break;
@@ -2572,7 +2572,8 @@ collection:
break;
case CLASS_LOWER:
for (cu = 1; cu <= 255; cu++)
- if (MB_ISLOWER(cu))
+ if (MB_ISLOWER(cu) && cu != 170
+ && cu != 186)
regmbc(cu);
break;
case CLASS_PRINT:
@@ -2581,7 +2582,7 @@ collection:
regmbc(cu);
break;
case CLASS_PUNCT:
- for (cu = 1; cu <= 255; cu++)
+ for (cu = 1; cu < 128; cu++)
if (ispunct(cu))
regmbc(cu);
break;