Patch 8.0.0298
Problem:    Ex command range with repeated search does not work. (Bruce
            DeVisser)
Solution:   Skip over \/, \? and \&.
Files:      src/ex_docmd.c, src/testdir/test_cmdline.vim


*** ../vim-8.0.0297/src/ex_docmd.c      2017-02-01 22:52:38.743796496 +0100
--- src/ex_docmd.c      2017-02-03 20:50:12.715505051 +0100
***************
*** 4357,4365 ****
  {
      unsigned  delim;
  
!     while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL)
      {
!       if (*cmd == '\'')
        {
            if (*++cmd == NUL && ctx != NULL)
                *ctx = EXPAND_NOTHING;
--- 4357,4372 ----
  {
      unsigned  delim;
  
!     while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;\\", *cmd) != NULL)
      {
!       if (*cmd == '\\')
!       {
!           if (cmd[1] == '?' || cmd[1] == '/' || cmd[1] == '&')
!               ++cmd;
!           else
!               break;
!       }
!       else if (*cmd == '\'')
        {
            if (*++cmd == NUL && ctx != NULL)
                *ctx = EXPAND_NOTHING;
*** ../vim-8.0.0297/src/testdir/test_cmdline.vim        2017-01-24 
21:18:15.986024183 +0100
--- src/testdir/test_cmdline.vim        2017-02-03 20:57:23.740313582 +0100
***************
*** 306,308 ****
--- 306,333 ----
    call assert_equal(a, b)
    bw!
  endfunc
+ 
+ " using a leading backslash here
+ set cpo+=C
+ 
+ func Test_cmdline_search_range()
+   new
+   call setline(1, ['a', 'b', 'c', 'd'])
+   /d
+   1,\/s/b/B/
+   call assert_equal('B', getline(2))
+ 
+   /a
+   $
+   \?,4s/c/C/
+   call assert_equal('C', getline(3))
+ 
+   call setline(1, ['a', 'b', 'c', 'd'])
+   %s/c/c/
+   1,\&s/b/B/
+   call assert_equal('B', getline(2))
+ 
+   bwipe!
+ endfunc
+ 
+ set cpo&
*** ../vim-8.0.0297/src/version.c       2017-02-02 22:59:22.583226973 +0100
--- src/version.c       2017-02-03 20:39:38.840058102 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     298,
  /**/

-- 
The Law, in its majestic equality, forbids the rich, as well as the
poor, to sleep under the bridges, to beg in the streets, and to steal
bread.                       -- Anatole France

 /// 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