aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-12-31 23:43:49 +0100
committerGitHub <noreply@github.com>2016-12-31 23:43:49 +0100
commit61d4ca214fef227aeb69ff02c2eb39f7a9e1e89e (patch)
tree5a724f7faf2f494d4aacbe82c7dc7513d6542fef /src/nvim/regexp_nfa.c
parent5366242789a4c2f53c52d2fe2f6be7284fcc73b5 (diff)
parent137dfdcc4e132616412e7d80e2c5fd879ae85192 (diff)
downloadrneovim-61d4ca214fef227aeb69ff02c2eb39f7a9e1e89e.tar.gz
rneovim-61d4ca214fef227aeb69ff02c2eb39f7a9e1e89e.tar.bz2
rneovim-61d4ca214fef227aeb69ff02c2eb39f7a9e1e89e.zip
Merge #5804 from brcolow/vim-7.4.1793
vim-patch:7.4.17[83,85,93]
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index d96858632f..474f3df32a 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -4320,12 +4320,14 @@ static int check_char_class(int class, int c)
{
switch (class) {
case NFA_CLASS_ALNUM:
- if (c >= 1 && c <= 255 && isalnum(c))
+ if (c >= 1 && c < 128 && isalnum(c)) {
return OK;
+ }
break;
case NFA_CLASS_ALPHA:
- if (c >= 1 && c <= 255 && isalpha(c))
+ if (c >= 1 && c < 128 && isalpha(c)) {
return OK;
+ }
break;
case NFA_CLASS_BLANK:
if (c == ' ' || c == '\t')
@@ -4344,16 +4346,18 @@ static int check_char_class(int class, int c)
return OK;
break;
case NFA_CLASS_LOWER:
- if (vim_islower(c))
+ if (vim_islower(c) && c != 170 && c != 186) {
return OK;
+ }
break;
case NFA_CLASS_PRINT:
if (vim_isprintc(c))
return OK;
break;
case NFA_CLASS_PUNCT:
- if (c >= 1 && c <= 255 && ispunct(c))
+ if (c >= 1 && c < 128 && ispunct(c)) {
return OK;
+ }
break;
case NFA_CLASS_SPACE:
if ((c >= 9 && c <= 13) || (c == ' '))