diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 3d446e9f..78949de5 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -40,7 +40,7 @@ def -hidden c-family-indent-on-newline %[ eval -draft -itersel %[ # remove previous empty lines resulting from the automatic indent try %[ exec -draft k ^\h+$ Hd ] # indent after an opening brace - try %[ exec -draft K s\{\h*$ j ] + try %[ exec -draft k s\{\h*$ j ] # indent after a label try %[ exec -draft k s[a-zA-Z0-9_-]+:\h*$ j ] # indent after a statement not followed by an opening brace diff --git a/test/indent/c-family/move-brace/cmd b/test/indent/c-family/move-brace/cmd new file mode 100644 index 00000000..54aed4f8 --- /dev/null +++ b/test/indent/c-family/move-brace/cmd @@ -0,0 +1 @@ +i diff --git a/test/indent/c-family/move-brace/in b/test/indent/c-family/move-brace/in new file mode 100644 index 00000000..7ebe9d97 --- /dev/null +++ b/test/indent/c-family/move-brace/in @@ -0,0 +1,3 @@ +namespace A +%({) +struct B; diff --git a/test/indent/c-family/move-brace/out b/test/indent/c-family/move-brace/out new file mode 100644 index 00000000..126487cb --- /dev/null +++ b/test/indent/c-family/move-brace/out @@ -0,0 +1,4 @@ +namespace A + +{ +struct B; diff --git a/test/indent/c-family/move-brace/rc b/test/indent/c-family/move-brace/rc new file mode 100644 index 00000000..53c40654 --- /dev/null +++ b/test/indent/c-family/move-brace/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/core/c-family.kak" +set buffer filetype cpp