Hi Peter and Bram,

2014/9/27(Sat) 5:00:01 UTC+9 Peter Mattern:
> As of 7.4.459 the script files as created by mksession or mkview contain 
> 
> an invalid line
> 
>            setlocal backupcopy=
> 
> which causes an E474 error when sourced.
> 
> 
> 
> Once a correct value such as auto was set manually, it doesn't get 
> 
> overwritten by running e, g, ':mksession!'.
> 
> 
> 
> Seen on Arch Linux (x86_64) using the distro's packages. Looking at the 
> 
> build system I couldn't find any possible culprit specific to the distro.
> 
> Problem couldn't be seen with 7.4.410, all configuration files remained 
> 
> unchanged during the update.
> 
> 
> 
> So doesn't this look like a bug or am I missing something?

I wrote a patch.
It may fix a this problem.

--
Best regards,
Hirohito Higashi

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r 1b74025a66e7 src/option.c
--- a/src/option.c	Sat Sep 27 11:18:20 2014 +0200
+++ b/src/option.c	Mon Sep 29 00:40:24 2014 +0900
@@ -5742,15 +5742,18 @@
 	    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))
+	{
+	    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;
+	    }
 	}
     }
 

Raspunde prin e-mail lui