diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-18 06:27:45 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-01-18 06:50:47 +0800 |
commit | 9a2dd52a6a2a17ae85102d738ab3620ef978d448 (patch) | |
tree | 1c8c9da2f6803c2c59884af7344f7309b60ebcdd /src/nvim/path.c | |
parent | 8c344378b8c22a0d47db294daa7483763c75fba6 (diff) | |
download | rneovim-9a2dd52a6a2a17ae85102d738ab3620ef978d448.tar.gz rneovim-9a2dd52a6a2a17ae85102d738ab3620ef978d448.tar.bz2 rneovim-9a2dd52a6a2a17ae85102d738ab3620ef978d448.zip |
vim-patch:9.0.1215: using isalpha() adds dependency on current locale
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 vim/vim#11835)
https://github.com/vim/vim/commit/0ef9a5c09482649cf0cc6768ed6fc640b4ed2a0a
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index afc0563498..da3659b8b8 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1768,7 +1768,7 @@ int path_with_url(const char *fname) // non-URL text. // first character must be alpha - if (!isalpha((uint8_t)(*fname))) { + if (!ASCII_ISALPHA(*fname)) { return 0; } @@ -1777,7 +1777,7 @@ int path_with_url(const char *fname) } // check body: alpha or dash - for (p = fname + 1; (isalpha((uint8_t)(*p)) || (*p == '-')); p++) {} + for (p = fname + 1; (ASCII_ISALPHA(*p) || (*p == '-')); p++) {} // check last char is not a dash if (p[-1] == '-') { |