Closed albfan closed 9 years ago
Using <sfile> may help
function! Foo()
echom expand("<sfile>")
endfunction
function! Bar()
call Foo()
endfunction
:call Bar()
=> function Bar..Foo
that string must be decrypted for dict functions
autoload/breakpts.vim:L1330 shows that line is currently avaliable context
.
The only problem is intermediate functions do not show it's current line. A workaround is parse that functions. In many cases there will be only one match for next function in bactrace.
Now #8 is implemented, adding a :BPDBacktrace
command has no pitfalls to solve.
Set a breakpoint on a debugged debug session:
[DEBUG BREAKPTS] Breakpoints: 1 func201_ShowRemoteContext línea 2
and issue these evaluation
:2BPDEvaluate map(split(context,'\.\.'), 'split(v:val, ",.*".s:str_line." ")')
[["function tagbar#ToggleWindow"] , ["200_ToggleWindow"] , [" 200_OpenWindow"] , [" 200_AutoUpdate"] , [" 200_RenderContent"] , [" 200_PrintKinds", "5"] ]
Anyone?
NOTE: New ToJson() function rocks! Don't it?
PR has been open on vim to provide lnum info
https://github.com/vim/vim/pull/426
More info on patch:
https://github.com/albfan/vim/issues/1
https://github.com/albfan/vim/commit/0566c3b9d4a19c6d712716d7e5dde1ac1a896ea7
Vim patch was accepted.
https://github.com/vim/vim/commit/1d6328ca00fc6cfe37b1f5e038ec23f443258886
Let's do some defensive code, to allow bactrace to work before and after that patch
if has("patch-7.4.879")
"read line and number -> Foo[4]
else
"just read line and last number
This will be superuseful, but seems unworkable with actual implementation of vim, hope I'm wrong!