vim-patch:8.2.3017: Vim9: debugger shows too many lines

Problem:    Vim9: debugger shows too many lines.
Solution:   Truncate at a comment, "enddef", etc. (closes vim/vim#8392)

59b50c3bee

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2023-11-13 06:41:38 +08:00
parent 02a43ddf1e
commit 940d9c59a7

View File

@ -998,6 +998,10 @@ func Test_debug_def_function()
a: 1, a: 1,
b: 2, b: 2,
} }
# comment
def Inner()
eval 1
enddef
enddef enddef
END END
call writefile(file, 'Xtest.vim') call writefile(file, 'Xtest.vim')
@ -1037,6 +1041,7 @@ func Test_debug_def_function()
\ ':debug call FuncWithDict()', \ ':debug call FuncWithDict()',
\ ['cmd: call FuncWithDict()']) \ ['cmd: call FuncWithDict()'])
call RunDbgCmd(buf, 'step', ['line 1: var d = { a: 1, b: 2, }']) call RunDbgCmd(buf, 'step', ['line 1: var d = { a: 1, b: 2, }'])
call RunDbgCmd(buf, 'step', ['line 6: def Inner()'])
call RunDbgCmd(buf, 'cont') call RunDbgCmd(buf, 'cont')
call StopVimInTerminal(buf) call StopVimInTerminal(buf)