vim-patch: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)

https://code.google.com/p/vim/source/detail?r=v7-4-462
This commit is contained in:
Pavel Platto 2015-01-20 19:53:10 +00:00
parent da43f70ba7
commit 2275b9753e
2 changed files with 15 additions and 10 deletions

View File

@ -3794,6 +3794,10 @@ did_set_string_option (
flags = &curbuf->b_bkc_flags;
}
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;
}
@ -3801,11 +3805,12 @@ did_set_string_option (
if (((*flags & BKC_AUTO) != 0)
+ ((*flags & BKC_YES) != 0)
+ ((*flags & BKC_NO) != 0) != 1) {
/* Must have exactly one of "auto", "yes" and "no". */
// 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' */
else if (varp == &p_bex || varp == &p_pm) {
if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,

View File

@ -283,7 +283,7 @@ static int included_patches[] = {
//465 NA
//464 NA
463,
//462,
462,
//461 NA
//460 NA
//459 NA