0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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 #11835)
This commit is contained in:
zeertzjq
2023-01-17 21:38:25 +00:00
committed by Bram Moolenaar
parent 541c87c808
commit 0ef9a5c094
4 changed files with 6 additions and 4 deletions

View File

@@ -2747,7 +2747,7 @@ checkforcmd_opt(
for (i = 0; cmd[i] != NUL; ++i)
if (((char_u *)cmd)[i] != (*pp)[i])
break;
if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_'
if (i >= len && !ASCII_ISALPHA((*pp)[i]) && (*pp)[i] != '_'
&& (!noparen || ((*pp)[i] != '(' && (*pp)[i] != '.')))
{
*pp = skipwhite(*pp + i);