aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/vars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval/vars.c')
-rw-r--r--src/nvim/eval/vars.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c
index 40a3707060..a0141402bc 100644
--- a/src/nvim/eval/vars.c
+++ b/src/nvim/eval/vars.c
@@ -1571,10 +1571,11 @@ static void set_option_from_tv(const char *varname, typval_T *varp)
if (varp->v_type == VAR_BOOL) {
numval = (long)varp->vval.v_number;
+ strval = "0"; // avoid using "false"
} else {
numval = (long)tv_get_number_chk(varp, &error);
+ strval = tv_get_string_buf_chk(varp, nbuf);
}
- strval = tv_get_string_buf_chk(varp, nbuf);
if (!error && strval != NULL) {
set_option_value(varname, numval, strval, OPT_LOCAL);
}