jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.150

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