diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 06:49:23 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 06:49:40 +0800 |
commit | b313109a25ac5d910b109410ed34324785bf3142 (patch) | |
tree | c7f1a9ff4ebbea828ba1c416472fdc3aad1efd1b | |
parent | 310d0f15c0db1622d24e8fda855e7dfa3d2fe832 (diff) | |
download | rneovim-b313109a25ac5d910b109410ed34324785bf3142.tar.gz rneovim-b313109a25ac5d910b109410ed34324785bf3142.tar.bz2 rneovim-b313109a25ac5d910b109410ed34324785bf3142.zip |
vim-patch:8.2.3116: Vim9: crash when debugging a function with line continuation
Problem: Vim9: crash when debugging a function with line continuation.
Solution: Check for a NULL pointer. (closes vim/vim#8521)
https://github.com/vim/vim/commit/303215d60cece0462f040035502b5bc95373bd6e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_debugger.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim index ae7672bffa..4cf25b9521 100644 --- a/test/old/testdir/test_debugger.vim +++ b/test/old/testdir/test_debugger.vim @@ -1050,6 +1050,7 @@ func Test_debug_def_function() eval 1 enddef enddef + def g:FuncComment() # comment echo "first" @@ -1057,6 +1058,7 @@ func Test_debug_def_function() # comment echo "second" enddef + def g:FuncForLoop() eval 1 for i in [11, 22, 33] @@ -1064,6 +1066,11 @@ func Test_debug_def_function() endfor echo "done" enddef + + def g:FuncWithSplitLine() + eval 1 + | eval 2 + enddef END call writefile(file, 'Xtest.vim') @@ -1119,6 +1126,12 @@ func Test_debug_def_function() call RunDbgCmd(buf, 'next', ['function FuncForLoop', 'line 2: for i in [11, 22, 33]']) call RunDbgCmd(buf, 'echo i', ['22']) + call RunDbgCmd(buf, 'breakdel *') + call RunDbgCmd(buf, 'cont') + + call RunDbgCmd(buf, ':breakadd func FuncWithSplitLine') + call RunDbgCmd(buf, ':call FuncWithSplitLine()', ['function FuncWithSplitLine', 'line 1: eval 1 | eval 2']) + call RunDbgCmd(buf, 'cont') call StopVimInTerminal(buf) call delete('Xtest.vim') |