diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 07:00:45 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 07:00:56 +0800 |
commit | d064f557041cddc11a60d27e2bfc6977a7e4e43b (patch) | |
tree | 04a2002cac484e7d75fe98a7d4a59865a4c0ea4c | |
parent | c5d4d1cc0df70d3d380066d21017e506628bec3c (diff) | |
download | rneovim-d064f557041cddc11a60d27e2bfc6977a7e4e43b.tar.gz rneovim-d064f557041cddc11a60d27e2bfc6977a7e4e43b.tar.bz2 rneovim-d064f557041cddc11a60d27e2bfc6977a7e4e43b.zip |
vim-patch:8.2.4541: Crash in debugger when a variable is not available
Problem: Crash in debugger when a variable is not available in the current
block.
Solution: Check for a NULL name. (closes vim/vim#9926)
https://github.com/vim/vim/commit/e406ff87c86de9da2d02d0e5ebbbf5c5eac051a6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_debugger.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim index fab6773fd1..7ac45a0bd4 100644 --- a/test/old/testdir/test_debugger.vim +++ b/test/old/testdir/test_debugger.vim @@ -73,6 +73,13 @@ func Test_Debugger() endtry return var1 endfunc + def Vim9Func() + for cmd in ['confirm', 'xxxxxxx'] + for _ in [1, 2] + echo cmd + endfor + endfor + enddef END call writefile(lines, 'Xtest.vim') @@ -298,6 +305,14 @@ func Test_Debugger() \ 'line 5: catch']) call RunDbgCmd(buf, 'c') + " Test showing local variable in :def function + call RunDbgCmd(buf, ':breakadd func 2 Vim9Func') + call RunDbgCmd(buf, ':call Vim9Func()', ['line 2: for _ in [1, 2]']) + call RunDbgCmd(buf, 'next', ['line 2: for _ in [1, 2]']) + call RunDbgCmd(buf, 'echo cmd', ['confirm']) + call RunDbgCmd(buf, 'breakdel *') + call RunDbgCmd(buf, 'cont') + " Test for :quit call RunDbgCmd(buf, ':debug echo Foo()') call RunDbgCmd(buf, 'breakdel *') |