mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.1.0803: tests: no error check when setting global 'isk'
Problem: tests: no error check when setting global 'isk' Solution: also parse and check global 'isk' value (Milly) closes: #15915 Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
142cad1f88
commit
5e7a6a4a10
@@ -2774,6 +2774,25 @@ did_set_imactivatekey(optset_T *args UNUSED)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The 'iskeyword' option is changed.
|
||||
*/
|
||||
char *
|
||||
did_set_iskeyword(optset_T *args)
|
||||
{
|
||||
char_u **varp = (char_u **)args->os_varp;
|
||||
|
||||
if (varp == &p_isk) // only check for global-value
|
||||
{
|
||||
if (check_isopt(*varp) == FAIL)
|
||||
return e_invalid_argument;
|
||||
}
|
||||
else // fallthrough for local-value
|
||||
return did_set_isopt(args);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* The 'isident' or the 'iskeyword' or the 'isprint' or the 'isfname' option is
|
||||
* changed.
|
||||
@@ -2781,7 +2800,7 @@ did_set_imactivatekey(optset_T *args UNUSED)
|
||||
char *
|
||||
did_set_isopt(optset_T *args)
|
||||
{
|
||||
// 'isident', 'iskeyword', 'isprint or 'isfname' option: refill g_chartab[]
|
||||
// 'isident', 'iskeyword', 'isprint' or 'isfname' option: refill g_chartab[]
|
||||
// If the new option is invalid, use old value.
|
||||
// 'lisp' option: refill g_chartab[] for '-' char.
|
||||
if (init_chartab() == FAIL)
|
||||
|
Reference in New Issue
Block a user