Patch 8.1.1519
Problem:    'backupskip' may contain duplicates.
Solution:   Add the P_NODUP flag. (Tom Ryder)
Files:      src/option.c, src/testdir/test_options.vim


*** ../vim-8.1.1518/src/option.c        2019-05-30 15:22:39.836174965 +0200
--- src/option.c        2019-06-12 18:58:25.164129272 +0200
***************
*** 616,622 ****
                            (char_u *)"~",
  #endif
                                            (char_u *)0L} SCTX_INIT},
!     {"backupskip",  "bsk",  P_STRING|P_VI_DEF|P_ONECOMMA,
  #ifdef FEAT_WILDIGN
                            (char_u *)&p_bsk, PV_NONE,
                            {(char_u *)"", (char_u *)0L}
--- 616,622 ----
                            (char_u *)"~",
  #endif
                                            (char_u *)0L} SCTX_INIT},
!     {"backupskip",  "bsk",  P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
  #ifdef FEAT_WILDIGN
                            (char_u *)&p_bsk, PV_NONE,
                            {(char_u *)"", (char_u *)0L}
***************
*** 4807,4813 ****
                             * hex numbers. */
                            vim_str2nr(arg, NULL, &i, STR2NR_ALL,
                                                     &value, NULL, 0, TRUE);
!                           if (i == 0 || (arg[i] != NUL && 
!VIM_ISWHITE(arg[i])))
                            {
                                errmsg = N_("E521: Number required after =");
                                goto skip;
--- 4807,4814 ----
                             * hex numbers. */
                            vim_str2nr(arg, NULL, &i, STR2NR_ALL,
                                                     &value, NULL, 0, TRUE);
!                           if (i == 0 || (arg[i] != NUL
!                                                     && !VIM_ISWHITE(arg[i])))
                            {
                                errmsg = N_("E521: Number required after =");
                                goto skip;
*** ../vim-8.1.1518/src/testdir/test_options.vim        2019-05-21 
20:54:42.078415244 +0200
--- src/testdir/test_options.vim        2019-06-12 18:56:18.596760829 +0200
***************
*** 419,424 ****
--- 419,433 ----
        call assert_true(found, var . ' (' . varvalue . ') not in option bsk: ' 
. &bsk)
      endif
    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
  
  func Test_copy_winopt()
*** ../vim-8.1.1518/src/version.c       2019-06-11 21:56:15.518267135 +0200
--- src/version.c       2019-06-12 18:57:26.672420489 +0200
***************
*** 779,780 ****
--- 779,782 ----
  {   /* Add new patch number below this line */
+ /**/
+     1519,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
160. You get in the elevator and double-click the button for the floor
     you want.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201906121706.x5CH68DH028596%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui