diff options
-rw-r--r-- | src/nvim/option.c | 23 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index a167363abf..0199c5fc6c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3794,16 +3794,21 @@ did_set_string_option ( flags = &curbuf->b_bkc_flags; } - if (opt_strings_flags(bkc, p_bkc_values, flags, TRUE) != OK) { - errmsg = e_invarg; - } + if ((opt_flags & OPT_LOCAL) && *bkc == NUL) { + // make the local value empty: use the global value + *flags = 0; + } else { + if (opt_strings_flags(bkc, p_bkc_values, flags, TRUE) != OK) { + errmsg = e_invarg; + } - if (((*flags & BKC_AUTO) != 0) - + ((*flags & BKC_YES) != 0) - + ((*flags & BKC_NO) != 0) != 1) { - /* Must have exactly one of "auto", "yes" and "no". */ - (void)opt_strings_flags(oldval, p_bkc_values, flags, TRUE); - errmsg = e_invarg; + if (((*flags & BKC_AUTO) != 0) + + ((*flags & BKC_YES) != 0) + + ((*flags & BKC_NO) != 0) != 1) { + // Must have exactly one of "auto", "yes" and "no". + (void)opt_strings_flags(oldval, p_bkc_values, flags, TRUE); + errmsg = e_invarg; + } } } /* 'backupext' and 'patchmode' */ diff --git a/src/nvim/version.c b/src/nvim/version.c index bb988a1012..83dc3c700b 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -283,7 +283,7 @@ static int included_patches[] = { //465 NA //464 NA 463, - //462, + 462, //461 NA //460 NA //459 NA |