comparison src/option.c @ 31766:9f1504e36ae9 v9.0.1215

patch 9.0.1215: using isalpha() adds dependency on current locale Commit: https://github.com/vim/vim/commit/0ef9a5c09482649cf0cc6768ed6fc640b4ed2a0a Author: zeertzjq <zeertzjq@outlook.com> Date: Tue Jan 17 21:38:25 2023 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Tue, 17 Jan 2023 22:45:02 +0100
parents 3365a601e73b
children aec031683d61
comparison
equal deleted inserted replaced
31765:63f5423aac68 31766:9f1504e36ae9
1682 while (*arg != NUL) // loop to process all options 1682 while (*arg != NUL) // loop to process all options
1683 { 1683 {
1684 errmsg = NULL; 1684 errmsg = NULL;
1685 startarg = arg; // remember for error message 1685 startarg = arg; // remember for error message
1686 1686
1687 if (STRNCMP(arg, "all", 3) == 0 && !isalpha(arg[3]) 1687 if (STRNCMP(arg, "all", 3) == 0 && !ASCII_ISALPHA(arg[3])
1688 && !(opt_flags & OPT_MODELINE)) 1688 && !(opt_flags & OPT_MODELINE))
1689 { 1689 {
1690 /* 1690 /*
1691 * ":set all" show all options. 1691 * ":set all" show all options.
1692 * ":set all&" set all options to their default value. 1692 * ":set all&" set all options to their default value.