diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index c5859c3a..9904bc29 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -57,8 +57,8 @@ def -hidden _c-family-indent-on-newline %[ eval -draft -itersel %[ try %[ exec -draft K s[a-zA-Z0-9_-]+:\h*$ j ] ## indent after a statement not followed by an opening brace try %[ exec -draft k \b(if|else|for|while)\h*\(.+?\)\h*$ j ] - ## align to the opening parenthesis when inserting a newline - try %[ exec -draft {b \`\( L s\`|.\' & ] + ## align to the opening parenthesis on the previous line when inserting a newline + try %[ exec -draft {b \`\([^\n]*\n[^\n]*\' L s\`|.\' & ] ] ] def -hidden _c-family-indent-on-opening-curly-brace %[