patch 9.1.0802: tests: no error check when setting global 'fdm' to empty value
Commit: https://github.com/vim/vim/commit/142cad1f88d1d3aa34b6050151e620b66185112e Author: Milly <milly...@gmail.com> Date: Tue Oct 22 22:11:51 2024 +0200 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: #15916 Signed-off-by: Milly <milly...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/optionstr.c b/src/optionstr.c index 259c64cef..50adc48d1 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -2336,8 +2336,7 @@ did_set_foldmethod(optset_T *args) { char_u **varp = (char_u **)args->os_varp; - if (check_opt_strings(*varp, p_fdm_values, FALSE) != OK - || *curwin->w_p_fdm == NUL) + if (check_opt_strings(*varp, p_fdm_values, FALSE) != OK || **varp == NUL) return e_invalid_argument; foldUpdateAll(curwin); diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim index d12191f29..83abadf1e 100644 --- a/src/testdir/gen_opt_test.vim +++ b/src/testdir/gen_opt_test.vim @@ -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', diff --git a/src/version.c b/src/version.c index 1701ffb00..4184b5528 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 802, /**/ 801, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1t3LHV-000MR5-UR%40256bit.org.