patch 8.2.2284: Vim9: cannot set an option to a boolean value
Problem: Vim9: cannot set an option to a boolean value.
Solution: Check for VAR_BOOL. (closes #7603)
diff --git a/src/evalvars.c b/src/evalvars.c
index 7fb190c..42b7ef5 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -3508,7 +3508,9 @@
char_u nbuf[NUMBUFLEN];
int error = FALSE;
- if (!in_vim9script() || varp->v_type != VAR_STRING)
+ if (varp->v_type == VAR_BOOL)
+ numval = (long)varp->vval.v_number;
+ else if (!in_vim9script() || varp->v_type != VAR_STRING)
numval = (long)tv_get_number_chk(varp, &error);
strval = tv_get_string_buf_chk(varp, nbuf);
if (!error && strval != NULL)