mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 06:10:39 +00:00
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:
@@ -436,6 +436,29 @@ func Test_Debugger_breakadd_expr()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
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()
|
func Test_Backtrace_Through_Source()
|
||||||
CheckRunVimInTerminal
|
CheckRunVimInTerminal
|
||||||
CheckCWD
|
CheckCWD
|
||||||
|
|||||||
Reference in New Issue
Block a user