Patch 7.4.1017
Problem:    When there is a backslash in an option ":set -=" doesn't work.
Solution:   Handle a backslash better. (Jacob Niehus)  Add a new test, merge
            in old test.
Files:      src/testdir/test_cdo.vim, src/testdir/test_set.vim,
            src/testdir/test_alot.vim, src/option.c, src/testdir/test_set.in,
            src/testdir/test_set.ok, src/Makefile


*** ../vim-7.4.1016/src/testdir/test_cdo.vim    2015-12-28 14:03:57.088941627 
+0100
--- src/testdir/test_cdo.vim    2016-01-01 14:24:29.842124151 +0100
***************
*** 1,6 ****
  " Tests for the :cdo, :cfdo, :ldo and :lfdo commands
  
- lang mess C
  if !has('quickfix')
    finish
  endif
--- 1,5 ----
*** ../vim-7.4.1016/src/testdir/test_set.vim    2016-01-01 14:46:44.255717817 
+0100
--- src/testdir/test_set.vim    2016-01-01 14:38:51.080825486 +0100
***************
*** 0 ****
--- 1,27 ----
+ " Tests for the :set command
+ 
+ function Test_set_backslash()
+   let isk_save = &isk
+ 
+   set isk=a,b,c
+   set isk+=d
+   call assert_equal('a,b,c,d', &isk)
+   set isk+=\\,e
+   call assert_equal('a,b,c,d,\,e', &isk)
+   set isk-=e
+   call assert_equal('a,b,c,d,\', &isk)
+   set isk-=\\
+   call assert_equal('a,b,c,d', &isk)
+ 
+   let &isk = isk_save
+ endfunction
+ 
+ function Test_set_add()
+   let wig_save = &wig
+ 
+   set wildignore=*.png,
+   set wildignore+=*.jpg
+   call assert_equal('*.png,*.jpg', &wig)
+ 
+   let &wig = wig_save
+ endfunction
*** ../vim-7.4.1016/src/testdir/test_alot.vim   2015-12-28 19:19:41.546241839 
+0100
--- src/testdir/test_alot.vim   2016-01-01 14:32:26.580974771 +0100
***************
*** 3,7 ****
--- 3,8 ----
  
  source test_lispwords.vim
  source test_searchpos.vim
+ source test_set.vim
  source test_sort.vim
  source test_undolevels.vim
*** ../vim-7.4.1016/src/option.c        2015-12-31 19:53:16.266087765 +0100
--- src/option.c        2016-01-01 14:35:22.855072670 +0100
***************
*** 4839,4847 ****
                                                || s[i] == NUL))
                                        break;
                                    /* Count backslashes.  Only a comma with an
!                                    * even number of backslashes before it is
!                                    * recognized as a separator */
!                                   if (s > origval && s[-1] == '\\')
                                        ++bs;
                                    else
                                        bs = 0;
--- 4839,4853 ----
                                                || s[i] == NUL))
                                        break;
                                    /* Count backslashes.  Only a comma with an
!                                    * even number of backslashes or a single
!                                    * backslash preceded by a comma before it
!                                    * is recognized as a separator */
!                                   if ((s > origval + 1
!                                               && s[-1] == '\\'
!                                               && s[-2] != ',')
!                                           || (s == origval + 1
!                                               && s[-1] == '\\'))
! 
                                        ++bs;
                                    else
                                        bs = 0;
*** ../vim-7.4.1016/src/testdir/test_set.in     2015-06-19 14:06:29.043993697 
+0200
--- src/testdir/test_set.in     1970-01-01 01:00:00.000000000 +0100
***************
*** 1,12 ****
- Tests for :set     vim: set ft=vim :
- 
- STARTTEST
- :so small.vim
- :set wildignore=*.png,
- :set wildignore+=*.jpg
- :$put =&wildignore
- :/^Output goes here/+1,$w! test.out
- :qa!
- ENDTEST
- 
- Output goes here
--- 0 ----
*** ../vim-7.4.1016/src/testdir/test_set.ok     2015-06-19 14:06:29.043993697 
+0200
--- src/testdir/test_set.ok     1970-01-01 01:00:00.000000000 +0100
***************
*** 1 ****
- *.png,*.jpg
--- 0 ----
*** ../vim-7.4.1016/src/Makefile        2015-12-30 17:56:01.815380914 +0100
--- src/Makefile        2016-01-01 14:39:31.240392045 +0100
***************
*** 1958,1964 ****
        test_qf_title \
        test_ruby \
        test_search_mbyte \
-       test_set \
        test_signs \
        test_tagcase \
        test_textobjects \
--- 1958,1963 ----
***************
*** 1980,1985 ****
--- 1979,1985 ----
  test_assert \
        test_cdo \
        test_searchpos \
+       test_set \
        test_sort \
        test_undolevels \
        test_viml \
*** ../vim-7.4.1016/src/version.c       2015-12-31 22:37:34.371021999 +0100
--- src/version.c       2016-01-01 14:29:09.251106231 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     1017,
  /**/

-- 
Mental Floss prevents moral decay!

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui