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" %{
|
def ctags-funcinfo -docstring "Display ctags information about a selected function" %{
|
||||||
eval -draft %{
|
eval -draft %{
|
||||||
|
try %{
|
||||||
exec '[(;B<a-k>[a-zA-Z_]+\(<ret><a-;>'
|
exec '[(;B<a-k>[a-zA-Z_]+\(<ret><a-;>'
|
||||||
%sh{
|
%sh{
|
||||||
sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/')
|
sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/')
|
||||||
|
@ -44,6 +45,7 @@ def ctags-funcinfo -docstring "Display ctags information about a selected functi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def ctags-enable-autoinfo -docstring "Automatically display ctags information about function" %{
|
def ctags-enable-autoinfo -docstring "Automatically display ctags information about function" %{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user