diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-24 06:04:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-10-24 06:56:11 +0800 |
commit | 6d2cf5ad3112d12b4b55df9df1e0921086b54fec (patch) | |
tree | fa99649f0fcd0ce79dd89fc47129037f402d8a13 | |
parent | 230b0c7f021a57647a658edce27fe115343f083f (diff) | |
download | rneovim-6d2cf5ad3112d12b4b55df9df1e0921086b54fec.tar.gz rneovim-6d2cf5ad3112d12b4b55df9df1e0921086b54fec.tar.bz2 rneovim-6d2cf5ad3112d12b4b55df9df1e0921086b54fec.zip |
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
https://github.com/vim/vim/commit/142cad1f88d1d3aa34b6050151e620b66185112e
Co-authored-by: Milly <milly.ca@gmail.com>
-rw-r--r-- | src/nvim/optionstr.c | 3 | ||||
-rw-r--r-- | test/old/testdir/gen_opt_test.vim | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index b560275de7..c801ec0a26 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -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); diff --git a/test/old/testdir/gen_opt_test.vim b/test/old/testdir/gen_opt_test.vim index 325e7e9438..85abeb2639 100644 --- a/test/old/testdir/gen_opt_test.vim +++ b/test/old/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', |