aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-13 06:45:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-11-13 06:46:17 +0800
commit06acf78cd323c82cc40d701c92997503ecb4aeb5 (patch)
treee8f4a98bbfb15382d4a3c04e2531ff0828740902
parent7e789137e9d5cc6713be5a2abde5c10b5713de82 (diff)
downloadrneovim-06acf78cd323c82cc40d701c92997503ecb4aeb5.tar.gz
rneovim-06acf78cd323c82cc40d701c92997503ecb4aeb5.tar.bz2
rneovim-06acf78cd323c82cc40d701c92997503ecb4aeb5.zip
vim-patch:8.2.3039: Vim9: breakpoint at a comment line does not work
Problem: Vim9: breakpoint at a comment line does not work. Solution: Add the comment line number to the debug instruction. (closes vim/vim#8429) https://github.com/vim/vim/commit/8cec9273d2518f2a9abcbd326722a2eba38d2a13 Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_debugger.vim15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim
index 90f7b4abd0..ba3893ae26 100644
--- a/test/old/testdir/test_debugger.vim
+++ b/test/old/testdir/test_debugger.vim
@@ -987,7 +987,7 @@ func Test_debug_DefFunction()
def LocalFunc()
echo "first"
echo "second"
- breakadd func 1 LegacyFunc
+ breakadd func LegacyFunc
LegacyFunc()
enddef
@@ -1051,6 +1051,13 @@ func Test_debug_def_function()
eval 1
enddef
enddef
+ def g:FuncComment()
+ # comment
+ echo "first"
+ .. "one"
+ # comment
+ echo "second"
+ enddef
END
call writefile(file, 'Xtest.vim')
@@ -1090,6 +1097,12 @@ func Test_debug_def_function()
\ ['cmd: call FuncWithDict()'])
call RunDbgCmd(buf, 'step', ['line 1: var d = { a: 1, b: 2, }'])
call RunDbgCmd(buf, 'step', ['line 6: def Inner()'])
+ call RunDbgCmd(buf, 'cont')
+
+ call RunDbgCmd(buf, ':breakadd func 1 FuncComment')
+ call RunDbgCmd(buf, ':call FuncComment()', ['function FuncComment', 'line 2: echo "first" .. "one"'])
+ call RunDbgCmd(buf, ':breakadd func 3 FuncComment')
+ call RunDbgCmd(buf, 'cont', ['function FuncComment', 'line 5: echo "second"'])
call RunDbgCmd(buf, 'cont')
call StopVimInTerminal(buf)