summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 717812c9ce..1b581ed355 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1990,6 +1990,8 @@ do_set_option_string(
// Set the new value.
*(char_u **)(varp) = newval;
+ if (newval == NULL)
+ *(char_u **)(varp) = empty_option;
#if defined(FEAT_EVAL)
if (!starting