Problem: :keeppatterns is not respected for :s.
Solution: Check the keeppatterns flag. (Yasuhiro Matsumoto)
* 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)
/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
foobar
+substitute foo asdf
one two
search()
1
1
two
+foo
+^substitute
+substitute bar xyz
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 150,
/**/
149,
/**/