diff --git a/src/rc/cpp.kak b/src/rc/cpp.kak index a1aab8b6..d93a8888 100644 --- a/src/rc/cpp.kak +++ b/src/rc/cpp.kak @@ -22,7 +22,7 @@ hook global WinSetOption filetype=cpp %~ addfilter -group cpp-filters regex ^(\h+)([^\n]*[^([{]\h*|$) \n \n$1 addfilter -group cpp-filters regex ^(\h*)[^\n]*[([{]\h* \n '\n$1 ' addfilter -group cpp-filters cleanup_whitespaces - hook window InsertEnd .* -id cpp-hooks %{ exec -draft s\h+$d } + hook window InsertEnd .* -id cpp-hooks %{ try %{ exec -draft s\h+$d } catch %{} } ~ hook global WinSetOption filetype=(?!cpp).* %{