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.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/optionstr.c b/src/optionstr.c
index 259c64c..50adc48 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -2336,8 +2336,7 @@
{
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);