From c7e6b58012cc5cad8f1cb02876883cad7fcbbdeb Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 16 Aug 2016 16:07:15 -0400 Subject: vim-patch:7.4.2219 Problem: Recursive call to substitute gets stuck in sandbox. (Nikolai Pavlov) Solution: Handle the recursive call. (Christian Brabandt, closes vim/vim#950) Add a test. https://github.com/vim/vim/commit/f5a39447a8ebe162ee62caa2ee502cd0e65eecaa Closes #5118 --- src/nvim/testdir/test_regexp_utf8.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index e1b1c2a9fb..38f9ed41d5 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -31,3 +31,11 @@ func Test_equivalence_re2() call s:equivalence_test() set re=0 endfunc + +func Test_recursive_substitute() + new + s/^/\=execute("s#^##gn") + " check we are now not in the sandbox + call setwinvar(1, 'myvar', 1) + bwipe! +endfunc -- cgit