]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.150 v7.4.150
authorBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 14:53:51 +0000 (15:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 14:53:51 +0000 (15:53 +0100)
Problem:    :keeppatterns is not respected for :s.
Solution:   Check the keeppatterns flag. (Yasuhiro Matsumoto)

src/search.c
src/testdir/test14.in
src/testdir/test14.ok
src/version.c

index d97dcf6bd9e67eab987c5c984823882f3aaa4226..e4985761ace9625c6d96a5e8f4c7ad79b76e4bbf 100644 (file)
@@ -201,7 +201,7 @@ search_regcomp(pat, pat_save, pat_use, options, regmatch)
      * Save the currently used pattern in the appropriate place,
      * unless the pattern should not be remembered.
      */
-    if (!(options & SEARCH_KEEP))
+    if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns)
     {
        /* search or global command */
        if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
index ebcb58c9d05e056c1ce8fec2082178a0f7c879f7..e6816a3f98e19b3f17780a3e31fb37d65d4276c8 100644 (file)
@@ -47,6 +47,15 @@ j:call search('^$', 'c')
 /two
 :call search('.', 'c')
 :call append(line('$'), getline('.')[col('.') - 1:])
+:"
+/^substitute
+:s/foo/bar/
+:$put =@/
+/^substitute
+:keeppatterns s/asdf/xyz/
+:$put =@/
+/^substitute
+Y:$put =@0
 :/^search()/,$w >>test.out
 :qa!
 ENDTEST
@@ -81,6 +90,7 @@ Piece of Java
 
 foobar
 
+substitute foo asdf
 
 one two
 search()
index 1fd89165e1163461fe0d4391dd637e050f02fbfd..ae3da29350391808fc1595e2a71127e5b92652af 100644 (file)
@@ -20,3 +20,6 @@ search()
 1
 1
 two
+foo
+^substitute
+substitute bar xyz
index 875a8fa953df2a92a3f420b1a6a01118b0a375fa..6c2c60fb095d16a4f5fc47f1b8dde1152c12fcb1 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    150,
 /**/
     149,
 /**/