]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.462 v7.4.462
authorBram Moolenaar <Bram@vim.org>
Mon, 29 Sep 2014 15:15:18 +0000 (17:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 29 Sep 2014 15:15:18 +0000 (17:15 +0200)
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)

src/option.c
src/version.c

index af9fb506fc7bcf98aafa5b602d1a9dc926f3aca9..5e8e95a6d27823664419da75742ee9da9a4b8b41 100644 (file)
@@ -5742,15 +5742,21 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
            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)
+       if ((opt_flags & OPT_LOCAL) && *bkc == NUL)
+           /* make the local value empty: use the global value */
+           *flags = 0;
+       else
        {
-           /* Must have exactly one of "auto", "yes"  and "no". */
-           (void)opt_strings_flags(oldval, p_bkc_values, flags, TRUE);
-           errmsg = e_invarg;
+           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;
+           }
        }
     }
 
index d0847ad7e51b1f683ed1e35b6794e159803cd85c..579e0f9ebfa8d51d10d23bad0ccb9fed6adb40c3 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    462,
 /**/
     461,
 /**/