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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user