diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-26 20:32:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-26 20:32:59 +0200 |
commit | 5930ddcd25c3c31a323cdb1b74c228958e124527 (patch) | |
tree | 0455805bd0abf89a56486a68347b6c4927b2eaab /src/testdir/test_vim9_cmd.vim | |
parent | b98cec28d95b2184c64a0646458c1e62deb2524b (diff) | |
download | vim-git-5930ddcd25c3c31a323cdb1b74c228958e124527.tar.gz |
patch 8.2.2812: Vim9: still crash when using substitute expressionv8.2.2812
Problem: Vim9: still crash when using substitute expression.
Solution: Put the instruction list in the stack frame. (closes #8154)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r-- | src/testdir/test_vim9_cmd.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index 5732e1eea..1e1a498bf 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -1208,15 +1208,18 @@ def Test_substitute_expr() CheckDefFailure(['s/from/\="x"/9'], 'E488:') # When calling a function the right instruction list needs to be restored. + g:cond = true var lines =<< trim END vim9script def Foo() Bar([]) enddef def Bar(l: list<number>) + if g:cond s/^/\=Rep()/ for n in l[:] endfor + endif enddef def Rep(): string return 'rep' @@ -1227,6 +1230,7 @@ def Test_substitute_expr() bwipe! END CheckScriptSuccess(lines) + unlet g:cond enddef def Test_redir_to_var() |