vim-patch:9.0.0138: not enough characters accepted for 'spellfile'

Problem:    Not enough characters accepted for 'spellfile'.
Solution:   Add vim_is_fname_char() and use it for 'spellfile'.

bc49c5f48f

Cherry-pick related doc update from Vim runtime.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-05-04 13:43:23 +08:00
parent a1bd31e601
commit 7e70a1e44b
4 changed files with 21 additions and 2 deletions

View File

@@ -3621,7 +3621,7 @@ bool valid_spellfile(const char *val)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
for (const char *s = val; *s != NUL; s++) {
if (!vim_isfilec((uint8_t)(*s)) && *s != ',' && *s != ' ') {
if (!vim_is_fname_char((uint8_t)(*s))) {
return false;
}
}