From 398cf6d8d39e28e55d9f9b7ee909521222593bff Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 21 Dec 2025 21:29:47 -0500 Subject: [PATCH] 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 --- test/old/testdir/test_debugger.vim | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim index b1493aa1c5..926f33364e 100644 --- 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