cpp.kak: wrap trailing whitespace cleanup hook in a try catch

This commit is contained in:
Maxime Coste 2013-07-12 13:13:54 +01:00
parent 37807ba19b
commit 0ba1ab04f0

View File

@ -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 <a-x>s\h+$<ret>d }
hook window InsertEnd .* -id cpp-hooks %{ try %{ exec -draft <a-x>s\h+$<ret>d } catch %{} }
~
hook global WinSetOption filetype=(?!cpp).* %{