diff --git a/rc/ctags.kak b/rc/ctags.kak index ab7b1cb0f..043f13ec1 100644 --- a/rc/ctags.kak +++ b/rc/ctags.kak @@ -36,12 +36,14 @@ def tag-complete -docstring "Insert completion candidates for the current select def ctags-funcinfo -docstring "Display ctags information about a selected function" %{ eval -draft %{ - exec '[(;B[a-zA-Z_]+\(' - %sh{ - sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/') - if [ -n "$sigs" ]; then - echo "eval -client ${kak_client} %{info -anchor $kak_cursor_line.$kak_cursor_column -placement above '$sigs'}" - fi + try %{ + exec '[(;B[a-zA-Z_]+\(' + %sh{ + sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/') + if [ -n "$sigs" ]; then + echo "eval -client ${kak_client} %{info -anchor $kak_cursor_line.$kak_cursor_column -placement above '$sigs'}" + fi + } } } }