From 694eb18e03a6a73321aafc19aa2f28104bdf3b8b Mon Sep 17 00:00:00 2001 From: Shougo Date: Mon, 19 Jun 2017 08:13:32 +0900 Subject: vim-patch:7.4.2356 (#6880) Problem: Reading past end of line when using previous substitute pattern. (Dominique Pelle) Solution: Don't set "pat" only set "searchstr". https://github.com/vim/vim/commit/ea683da58cf9ecf3afab9d650d3d2da76e5298d3 --- src/nvim/testdir/Makefile | 1 + src/nvim/testdir/test_search.vim | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/nvim/testdir/test_search.vim (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 3482001f63..7e55fffa06 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -58,6 +58,7 @@ NEW_TESTS ?= \ test_nested_function.res \ test_normal.res \ test_quickfix.res \ + test_search.res \ test_signs.res \ test_smartindent.res \ test_stat.res \ diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim new file mode 100644 index 0000000000..e85525e663 --- /dev/null +++ b/src/nvim/testdir/test_search.vim @@ -0,0 +1,12 @@ +" Test for the search command + +func Test_use_sub_pat() + split + let @/ = '' + func X() + s/^/a/ + / + endfunc + call X() + bwipe! +endfunc -- cgit