-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
covimerage doesn't handle execute "function! ... | ... | endfunction"
#73
Comments
Simple reproducible exampletest.vim execute join([
\ 'function! Foo()',
\ ' return 0',
\ 'endfunction',
\ ], "\n")
call Foo()
prof.log
|
Thanks for the detailed report, will look into fixing the crash. However, isn't the line number wrong to begin with?
It should probably be 1, where the With the following it will be "defined" at line 3 and line 8:
And with the following at lines -1 and 0: execute "function! F_via_execute_1()\nreturn 0\nendfunction"
execute "function! F_via_execute_2()\nreturn 0\nendfunction"
call F_via_execute_1()
call F_via_execute_2() Anyway, this is a bug in Vim apparently - do you know how to fix this already maybe? Otherwise we should report it there. |
v0.1.6 in the process of being released. |
Reported for Vim at vim/vim#4511. |
As of Vim 8.1.0365, Vim shows the places to be defined of functions (
Defined: /path/to/src.vim line XXX
).But covimerage can't handle functions created by
execute {string}
.Vim script example)
https://github.com/vim-jp/vital.vim/blob/3bf594477df06f006a9de60012e7ae3d75479a14/autoload/vital/__vital__/Web/URI.vim#L640-L644
Workaround
Currently removing
Defined:
lines from the profile output.vim-jp/vital.vim#651
cc: @ichizok
The text was updated successfully, but these errors were encountered: