dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.150
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.150
dcaee6
Problem:    :keeppatterns is not respected for :s.
dcaee6
Solution:   Check the keeppatterns flag. (Yasuhiro Matsumoto)
dcaee6
Files:	    src/search.c, src/testdir/test14.in, src/testdir/test14.ok
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.149/src/search.c	2013-11-28 19:27:18.000000000 +0100
dcaee6
--- src/search.c	2014-01-14 15:44:33.000000000 +0100
dcaee6
***************
dcaee6
*** 201,207 ****
dcaee6
       * Save the currently used pattern in the appropriate place,
dcaee6
       * unless the pattern should not be remembered.
dcaee6
       */
dcaee6
!     if (!(options & SEARCH_KEEP))
dcaee6
      {
dcaee6
  	/* search or global command */
dcaee6
  	if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
dcaee6
--- 201,207 ----
dcaee6
       * Save the currently used pattern in the appropriate place,
dcaee6
       * unless the pattern should not be remembered.
dcaee6
       */
dcaee6
!     if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns)
dcaee6
      {
dcaee6
  	/* search or global command */
dcaee6
  	if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
dcaee6
*** ../vim-7.4.149/src/testdir/test14.in	2013-04-03 20:59:14.000000000 +0200
dcaee6
--- src/testdir/test14.in	2014-01-14 15:43:28.000000000 +0100
dcaee6
***************
dcaee6
*** 47,52 ****
dcaee6
--- 47,61 ----
dcaee6
  /two
dcaee6
  :call search('.', 'c')
dcaee6
  :call append(line('$'), getline('.')[col('.') - 1:])
dcaee6
+ :"
dcaee6
+ /^substitute
dcaee6
+ :s/foo/bar/
dcaee6
+ :$put =@/
dcaee6
+ /^substitute
dcaee6
+ :keeppatterns s/asdf/xyz/
dcaee6
+ :$put =@/
dcaee6
+ /^substitute
dcaee6
+ Y:$put =@0
dcaee6
  :/^search()/,$w >>test.out
dcaee6
  :qa!
dcaee6
  ENDTEST
dcaee6
***************
dcaee6
*** 81,86 ****
dcaee6
--- 90,96 ----
dcaee6
  
dcaee6
  foobar
dcaee6
  
dcaee6
+ substitute foo asdf
dcaee6
  
dcaee6
  one two
dcaee6
  search()
dcaee6
*** ../vim-7.4.149/src/testdir/test14.ok	2013-04-03 20:59:14.000000000 +0200
dcaee6
--- src/testdir/test14.ok	2014-01-14 15:46:42.000000000 +0100
dcaee6
***************
dcaee6
*** 20,22 ****
dcaee6
--- 20,25 ----
dcaee6
  1
dcaee6
  1
dcaee6
  two
dcaee6
+ foo
dcaee6
+ ^substitute
dcaee6
+ substitute bar xyz
dcaee6
*** ../vim-7.4.149/src/version.c	2014-01-14 15:24:24.000000000 +0100
dcaee6
--- src/version.c	2014-01-14 15:45:34.000000000 +0100
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     150,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
hundred-and-one symptoms of being an internet addict:
dcaee6
158. You get a tuner card so you can watch TV while surfing.
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///