diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-17 21:38:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-17 21:38:25 +0000 |
commit | 0ef9a5c09482649cf0cc6768ed6fc640b4ed2a0a (patch) | |
tree | ae5d05622365b8043bf3068e07ad48afd64ca8bb /src/misc1.c | |
parent | 541c87c808df91b55e51fedc4987152a3edfe80d (diff) |
patch 9.0.1215: using isalpha() adds dependency on current localev9.0.1215
Problem: Using isalpha() adds dependency on current locale.
Solution: Do not use isalpha() for recognizing a URL or the end of an Ex
command. (closes #11835)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c index 019bbaf8dd..d369f2aa24 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2699,11 +2699,11 @@ path_with_url(char_u *fname) // non-URL text. // first character must be alpha - if (!isalpha(*fname)) + if (!ASCII_ISALPHA(*fname)) return 0; // check body: alpha or dash - for (p = fname + 1; (isalpha(*p) || (*p == '-')); ++p) + for (p = fname + 1; (ASCII_ISALPHA(*p) || (*p == '-')); ++p) ; // check last char is not a dash |