vim-patch:9.1.0802: tests: no error check when setting global 'fdm' to empty value

Problem:  tests: no error check when setting global 'fdm' to empty value
Solution: Also check global 'fdm' value for being empty (Milly).

closes: vim/vim#15916

142cad1f88

Co-authored-by: Milly <milly.ca@gmail.com>
This commit is contained in:
zeertzjq
2024-10-24 06:04:13 +08:00
parent 230b0c7f02
commit 6d2cf5ad31
2 changed files with 1 additions and 3 deletions

View File

@@ -1448,8 +1448,7 @@ const char *did_set_foldmethod(optset_T *args)
{
win_T *win = (win_T *)args->os_win;
char **varp = (char **)args->os_varp;
if (check_opt_strings(*varp, p_fdm_values, false) != OK
|| *win->w_p_fdm == NUL) {
if (check_opt_strings(*varp, p_fdm_values, false) != OK || **varp == NUL) {
return e_invarg;
}
foldUpdateAll(win);

View File

@@ -49,7 +49,6 @@ let skip_setglobal_reasons = #{
\ colorcolumn: 'TODO: fix missing error handling for setglobal',
\ conceallevel: 'TODO: fix missing error handling for setglobal',
\ foldcolumn: 'TODO: fix missing error handling for setglobal',
\ foldmethod: 'TODO: fix `setglobal fdm=` not given an error',
\ iskeyword: 'TODO: fix missing error handling for setglobal',
\ numberwidth: 'TODO: fix missing error handling for setglobal',
\ scrolloff: 'TODO: fix missing error handling for setglobal',