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