Prevent the "funcinfo" command from printing errors
Add a try{} scope around the exec statement that raises errors when no selection was possible/made.
This commit is contained in:
parent
38bb9fc3a8
commit
8beb1da552
|
@ -36,6 +36,7 @@ def tag-complete -docstring "Insert completion candidates for the current select
|
|||
|
||||
def ctags-funcinfo -docstring "Display ctags information about a selected function" %{
|
||||
eval -draft %{
|
||||
try %{
|
||||
exec '[(;B<a-k>[a-zA-Z_]+\(<ret><a-;>'
|
||||
%sh{
|
||||
sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/')
|
||||
|
@ -45,6 +46,7 @@ def ctags-funcinfo -docstring "Display ctags information about a selected functi
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def ctags-enable-autoinfo -docstring "Automatically display ctags information about function" %{
|
||||
hook window -group ctags-autoinfo NormalKey .* ctags-funcinfo
|
||||
|
|
Loading…
Reference in New Issue
Block a user