]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.155 v7.4.155
authorBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 20:31:34 +0000 (21:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 20:31:34 +0000 (21:31 +0100)
Problem:    ":keeppatterns /pat" does not keep search pattern offset.
Solution:   Restore the offset after doing the search.

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

index e4985761ace9625c6d96a5e8f4c7ad79b76e4bbf..0341a5e479c77e28ec3c03f66a628f2b589edb3d 100644 (file)
@@ -1437,7 +1437,7 @@ do_search(oap, dirc, pat, count, options, tm)
     curwin->w_set_curswant = TRUE;
 
 end_do_search:
-    if (options & SEARCH_KEEP)
+    if ((options & SEARCH_KEEP) || cmdmod.keeppatterns)
        spats[0].off = old_off;
     vim_free(strcopy);
 
index e6816a3f98e19b3f17780a3e31fb37d65d4276c8..fb987ebc88b6e25561c5c194452bd4a4b5cbf1c0 100644 (file)
@@ -56,7 +56,10 @@ j:call search('^$', 'c')
 :$put =@/
 /^substitute
 Y:$put =@0
-:/^search()/,$w >>test.out
+/bar /e
+:$put =@0
+-:keeppatterns /xyz
+0dn:/^search()/,$w >>test.out
 :qa!
 ENDTEST
 
index ae3da29350391808fc1595e2a71127e5b92652af..0aa2db3f97200bc08b8a5c1cb01d426269ba73f5 100644 (file)
@@ -23,3 +23,4 @@ two
 foo
 ^substitute
 substitute bar xyz
+xyz
index 9b017bb7cdb36c5058bc06e68a4e94eb30dd39f2..9d3ff576e48e6475211ecf699b3c5173c8c188e7 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    155,
 /**/
     154,
 /**/