0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

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 #9137)
This commit is contained in:
Bram Moolenaar
2021-11-23 22:16:34 +00:00
parent 65259b5c6a
commit 112bed0cbe
3 changed files with 26 additions and 1 deletions

View File

@@ -373,6 +373,29 @@ def Test_Debugger_breakadd_expr()
call delete('Xtest.vim')
enddef
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()
CheckCWD
let file1 =<< trim END