diff src/testdir/test_search.vim @ 10172:ab45de65977b v7.4.2356

commit https://github.com/vim/vim/commit/ea683da58cf9ecf3afab9d650d3d2da76e5298d3 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 9 21:41:34 2016 +0200 patch 7.4.2356 Problem: Reading past end of line when using previous substitute pattern. (Dominique Pelle) Solution: Don't set "pat" only set "searchstr".
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Sep 2016 21:45:05 +0200
parents 72e4b7f90465
children 1435e45ee6fa
line wrap: on
line diff
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -268,3 +268,14 @@ func Test_search_cmdline2()
   call test_disable_char_avail(0)
   bw!
 endfunc
+
+func Test_use_sub_pat()
+  split
+  let @/ = ''
+  func X()
+    s/^/a/
+    /
+  endfunc
+  call X()
+  bwipe!
+endfunc