summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-01-14 15:53:51 +0100
committerBram Moolenaar <Bram@vim.org>2014-01-14 15:53:51 +0100
commit14177b77bf7bb9c3f1c7c8805bc6cff1b651c136 (patch)
tree4fa21e173a18fe911c30d2773d63596c6dd9f689
parent6d977d6c1c14fa3d8fba2576e461ecaf93dcd884 (diff)
downloadvim-git-7.4.150.tar.gz
updated for version 7.4.150v7.4.150
Problem: :keeppatterns is not respected for :s. Solution: Check the keeppatterns flag. (Yasuhiro Matsumoto)
-rw-r--r--src/search.c2
-rw-r--r--src/testdir/test14.in10
-rw-r--r--src/testdir/test14.ok3
-rw-r--r--src/version.c2
4 files changed, 16 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index d97dcf6bd..e4985761a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -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)
diff --git a/src/testdir/test14.in b/src/testdir/test14.in
index ebcb58c9d..e6816a3f9 100644
--- a/src/testdir/test14.in
+++ b/src/testdir/test14.in
@@ -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()
diff --git a/src/testdir/test14.ok b/src/testdir/test14.ok
index 1fd89165e..ae3da2935 100644
--- a/src/testdir/test14.ok
+++ b/src/testdir/test14.ok
@@ -20,3 +20,6 @@ search()
1
1
two
+foo
+^substitute
+substitute bar xyz
diff --git a/src/version.c b/src/version.c
index 875a8fa95..6c2c60fb0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 150,
+/**/
149,
/**/
148,