]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0802: tests: no error check when setting global 'fdm' to empty value v9.1.0802
authorMilly <milly.ca@gmail.com>
Tue, 22 Oct 2024 20:11:51 +0000 (22:11 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 22 Oct 2024 20:11:51 +0000 (22:11 +0200)
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.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/optionstr.c
src/testdir/gen_opt_test.vim
src/version.c

index 259c64cefed88a919e883f9e6a24d87701b1f82a..50adc48d17bca357f60098b66ae937e961482273 100644 (file)
@@ -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);
index d12191f29e8e8a9fcee21c64439656d123074947..83abadf1e37e07c987aad2c3a8689ebc6d7c03e1 100644 (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',
index 1701ffb0026ea0b67e29fd6dab7062735a4ddbfd..4184b55284c2358392e01a258eb6cb28b36f73a3 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    802,
 /**/
     801,
 /**/