aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2018-06-02 01:57:22 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-06-01 19:57:22 +0200
commit49a497a67c92f339ff9ce2939188b651e250367b (patch)
tree6774ff316bd501ba21169b59cc5dbd0759376964 /src/nvim/regexp.c
parentc7350f542ade5ea4f19e490ef3638fbf8cf6db41 (diff)
downloadrneovim-49a497a67c92f339ff9ce2939188b651e250367b.tar.gz
rneovim-49a497a67c92f339ff9ce2939188b651e250367b.tar.bz2
rneovim-49a497a67c92f339ff9ce2939188b651e250367b.zip
vim-patch:8.0.0519: character classes not well tested (#8460)
Problem: Character classes are not well tested. They can differ between platforms. Solution: Add tests. In the documentation make clear which classes depend on what library function. Only use :cntrl: and :graph: for ASCII. (Kazunobu Kuriyama, Dominique Pelle, closes vim/vim#1560) Update the documentation. https://github.com/vim/vim/commit/0c078fc7db2902d4ccba04506db082ddbef45a8c
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index e4de43b49e..ee7d6d8500 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -2328,21 +2328,21 @@ collection:
regc('\t');
break;
case CLASS_CNTRL:
- for (cu = 1; cu <= 255; cu++) {
+ for (cu = 1; cu <= 127; cu++) {
if (iscntrl(cu)) {
regmbc(cu);
}
}
break;
case CLASS_DIGIT:
- for (cu = 1; cu <= 255; cu++) {
+ for (cu = 1; cu <= 127; cu++) {
if (ascii_isdigit(cu)) {
regmbc(cu);
}
}
break;
case CLASS_GRAPH:
- for (cu = 1; cu <= 255; cu++) {
+ for (cu = 1; cu <= 127; cu++) {
if (isgraph(cu)) {
regmbc(cu);
}