Update go brace deindenting to handle bad indentation edge case

This commit is contained in:
John Isom 2020-07-27 12:19:00 -06:00
parent 504d309894
commit 9004502049

View File

@ -90,7 +90,7 @@ define-command -hidden go-indent-on-new-line %~
# indent after if|else|while|for
try %[ execute-keys -draft <semicolon><a-F>)MB <a-k> \A(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\z <ret> s \A|.\z <ret> 1<a-&>1<a-space><a-gt> ]
# deindent closing brace(s) when after cursor
try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> ]
try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> hm <a-S> 1<a-&> ]
=
~