diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-18 13:41:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-18 13:41:22 +0200 |
commit | 6349e9411fd17f80c7aff9c678a8800647d34cfa (patch) | |
tree | 864908c652f6e0f5e074db2b2d38d3062ae90cc3 /src/testdir/test_substitute.vim | |
parent | 0d3cb73012332964e7a81d7afd1c21d393f45566 (diff) | |
download | vim-git-6349e9411fd17f80c7aff9c678a8800647d34cfa.tar.gz |
patch 8.1.1345: stuck in sandbox with ":s/../\=Function/gn"v8.1.1345
Problem: Stuck in sandbox with ":s/../\=Function/gn".
Solution: Don't skip over code to restore sandbox. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_substitute.vim')
-rw-r--r-- | src/testdir/test_substitute.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim index a58b56ec8..06bdc243d 100644 --- a/src/testdir/test_substitute.vim +++ b/src/testdir/test_substitute.vim @@ -638,6 +638,17 @@ func Test_nocatch_sub_failure_handling() call assert_equal(1, error_caught) call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3)) + " Same, but using "n" flag so that "sandbox" gets set + call setline(1, ['1 aaa', '2 aaa', '3 aaa']) + let error_caught = 0 + try + %s/aaa/\=Foo()/gn + catch + let error_caught = 1 + endtry + call assert_equal(1, error_caught) + call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3)) + bwipe! endfunc |