# HG changeset patch # User Bram Moolenaar # Date 1412003718 -7200 # Node ID c0d93d67572b2d4161d0c5a5ab09477d6447ff49 # Parent 1b74025a66e7db8250b8e92724a2aa515c68fde0 updated for version 7.4.462 Problem: Setting the local value of 'backupcopy' empty gives an error. (Peter Mattern) Solution: When using an empty value set the flags to zero. (Hirohito Higashi) diff --git a/src/option.c b/src/option.c --- a/src/option.c +++ b/src/option.c @@ -5742,15 +5742,21 @@ did_set_string_option(opt_idx, varp, new flags = &curbuf->b_bkc_flags; } - if (opt_strings_flags(bkc, p_bkc_values, flags, TRUE) != OK) - errmsg = e_invarg; - if ((((int)*flags & BKC_AUTO) != 0) - + (((int)*flags & BKC_YES) != 0) - + (((int)*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 ((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 ((((int)*flags & BKC_AUTO) != 0) + + (((int)*flags & BKC_YES) != 0) + + (((int)*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; + } } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 462, +/**/ 461, /**/ 460,