@@ -177,8 +177,10 @@ function! s:_format_throwpoint(throwpoint) abort
177
177
endif
178
178
let info = s: _get_func_info (name)
179
179
if ! empty (info)
180
- call add (funcs, printf (' function %s(...) %s Line:%d (%s)' ,
181
- \ info.funcname, join (info.attrs, ' ' ), lnum, info.filename))
180
+ let attrs = empty (info.attrs) ? ' ' : join ([' ' ] + info.attrs)
181
+ let flnum = info.lnum == 0 ? ' ' : printf (' Line:%d' , info.lnum + lnum)
182
+ call add (funcs, printf (' function %s(...)%s Line:%d (%s%s)' ,
183
+ \ info.funcname, attrs, lnum, info.filename, flnum))
182
184
continue
183
185
endif
184
186
endif
@@ -197,9 +199,11 @@ function! s:_get_func_info(name) abort
197
199
let body = execute (printf (' verbose function %s' , name))
198
200
let lines = split (body, " \n " )
199
201
let signature = matchstr (lines [0 ], ' ^\s*\zs.*' )
200
- let file = matchstr (lines [1 ], ' ^\t\%(Last set from\|.\{-}:\)\s*\zs.*$' )
202
+ let [_, file , lnum; __] = matchlist (lines [1 ],
203
+ \ ' ^\t\%(Last set from\|.\{-}:\)\s*\zs\(.\{-}\)\%( \S\+ \(\d\+\)\)\?$' )
201
204
return {
202
205
\ ' filename' : substitute (file , ' [/\\]\+' , ' /' , ' g' ),
206
+ \ ' lnum' : 0 + lnum,
203
207
\ ' funcname' : a: name ,
204
208
\ ' arguments' : split (matchstr (signature, ' (\zs.*\ze)' ), ' \s*,\s*' ),
205
209
\ ' attrs' : filter ([' dict' , ' abort' , ' range' , ' closure' ], ' signature =~# (").*" . v:val)' ),
0 commit comments