summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-17 21:38:25 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-17 21:38:25 +0000
commit0ef9a5c09482649cf0cc6768ed6fc640b4ed2a0a (patch)
treeae5d05622365b8043bf3068e07ad48afd64ca8bb /src/misc1.c
parent541c87c808df91b55e51fedc4987152a3edfe80d (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.c4
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