commit 398cf6d8d39e28e55d9f9b7ee909521222593bff
parent 3fc3f5f194daaf1b9501d5d731ad3889aebfa81e
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date: Sun, 21 Dec 2025 21:29:47 -0500
vim-patch:8.2.3657: Vim9: debug text misses one line of return statement
Problem: Vim9: debug text misses one line of return statement.
Solution: Add a line when not at a debug instruction. (closes vim/vim#9137)
https://github.com/vim/vim/commit/112bed0cbeac84f73dca2682c5c2d74fabe1114d
Vim9 test "Test_Debugger_break_at_return()" commented out
to avoid unexpected side-effects even if all other tests pass.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat:
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim
@@ -436,6 +436,29 @@ func Test_Debugger_breakadd_expr()
call StopVimInTerminal(buf)
endfunc
+" def Test_Debugger_break_at_return()
+" var lines =<< trim END
+" vim9script
+" def g:GetNum(): number
+" return 1
+" + 2
+" + 3
+" enddef
+" breakadd func GetNum
+" END
+" writefile(lines, 'Xtest.vim')
+"
+" # Start Vim in a terminal
+" var buf = RunVimInTerminal('-S Xtest.vim', {wait_for_ruler: 0})
+" call TermWait(buf)
+"
+" RunDbgCmd(buf, ':call GetNum()',
+" ['line 1: return 1 + 2 + 3'], {match: 'pattern'})
+"
+" call StopVimInTerminal(buf)
+" call delete('Xtest.vim')
+" enddef
+
func Test_Backtrace_Through_Source()
CheckRunVimInTerminal
CheckCWD