mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1519: 'backupskip' may contain duplicates
Problem: 'backupskip' may contain duplicates. Solution: Add the P_NODUP flag. (Tom Ryder)
This commit is contained in:
parent
202d982b36
commit
06e2c81f6d
@ -616,7 +616,7 @@ static struct vimoption options[] =
|
|||||||
(char_u *)"~",
|
(char_u *)"~",
|
||||||
#endif
|
#endif
|
||||||
(char_u *)0L} SCTX_INIT},
|
(char_u *)0L} SCTX_INIT},
|
||||||
{"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA,
|
{"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
|
||||||
#ifdef FEAT_WILDIGN
|
#ifdef FEAT_WILDIGN
|
||||||
(char_u *)&p_bsk, PV_NONE,
|
(char_u *)&p_bsk, PV_NONE,
|
||||||
{(char_u *)"", (char_u *)0L}
|
{(char_u *)"", (char_u *)0L}
|
||||||
@ -4807,7 +4807,8 @@ do_set(
|
|||||||
* hex numbers. */
|
* hex numbers. */
|
||||||
vim_str2nr(arg, NULL, &i, STR2NR_ALL,
|
vim_str2nr(arg, NULL, &i, STR2NR_ALL,
|
||||||
&value, NULL, 0, TRUE);
|
&value, NULL, 0, TRUE);
|
||||||
if (i == 0 || (arg[i] != NUL && !VIM_ISWHITE(arg[i])))
|
if (i == 0 || (arg[i] != NUL
|
||||||
|
&& !VIM_ISWHITE(arg[i])))
|
||||||
{
|
{
|
||||||
errmsg = N_("E521: Number required after =");
|
errmsg = N_("E521: Number required after =");
|
||||||
goto skip;
|
goto skip;
|
||||||
|
@ -419,6 +419,15 @@ func Test_backupskip()
|
|||||||
call assert_true(found, var . ' (' . varvalue . ') not in option bsk: ' . &bsk)
|
call assert_true(found, var . ' (' . varvalue . ') not in option bsk: ' . &bsk)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
" Duplicates should be filtered out (option has P_NODUP)
|
||||||
|
let backupskip = &backupskip
|
||||||
|
set backupskip=
|
||||||
|
set backupskip+=/test/dir
|
||||||
|
set backupskip+=/other/dir
|
||||||
|
set backupskip+=/test/dir
|
||||||
|
call assert_equal('/test/dir,/other/dir', &backupskip)
|
||||||
|
let &backupskip = backupskip
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_copy_winopt()
|
func Test_copy_winopt()
|
||||||
|
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1519,
|
||||||
/**/
|
/**/
|
||||||
1518,
|
1518,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user