aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-04-08 02:55:51 +0300
committerZyX <kp-pav@yandex.ru>2017-04-08 02:55:51 +0300
commitacc52a953b99f78435c34337b8ca9b6716a057a1 (patch)
tree5c7491823cebc10a3fc3ee1ae2817d040cb137af /src/nvim/regexp.c
parentcaeff6e1aff227bb5826ad575362d2a24adebaa9 (diff)
downloadrneovim-acc52a953b99f78435c34337b8ca9b6716a057a1.tar.gz
rneovim-acc52a953b99f78435c34337b8ca9b6716a057a1.tar.bz2
rneovim-acc52a953b99f78435c34337b8ca9b6716a057a1.zip
regexp: Update comment in cstrchr()
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 893089f06d..96884aa87f 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -6295,9 +6295,8 @@ static inline char_u *cstrchr(const char_u *const s, const int c)
return vim_strchr(s, c);
}
- // tolower() and toupper() can be slow, comparing twice should be a lot
- // faster (esp. when using MS Visual C++!).
- // For UTF-8 need to use folded case.
+ // Use folded case for UTF-8, slow! For ASCII use libc strpbrk which is
+ // expected to be highly optimized.
if (c > 0x80) {
const int folded_c = utf_fold(c);
for (const char_u *p = s; *p != NUL; p += utfc_ptr2len(p)) {