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)

112bed0cbe

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>
This commit is contained in:
Jan Edmund Lazo
2025-12-21 21:29:47 -05:00
parent 3fc3f5f194
commit 398cf6d8d3

View File

@@ -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