Fix corner case in C indentation
This commit is contained in:
parent
ac1192f58a
commit
d5231c713e
|
@ -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 <a-x> <a-k>^\h+$<ret> Hd ]
|
||||
# indent after an opening brace
|
||||
try %[ exec -draft K s\{\h*$<ret> j <a-gt> ]
|
||||
try %[ exec -draft k <a-x> s\{\h*$<ret> j <a-gt> ]
|
||||
# indent after a label
|
||||
try %[ exec -draft k <a-x> s[a-zA-Z0-9_-]+:\h*$<ret> j <a-gt> ]
|
||||
# indent after a statement not followed by an opening brace
|
||||
|
|
1
test/indent/c-family/move-brace/cmd
Normal file
1
test/indent/c-family/move-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
i<ret><esc>
|
3
test/indent/c-family/move-brace/in
Normal file
3
test/indent/c-family/move-brace/in
Normal file
|
@ -0,0 +1,3 @@
|
|||
namespace A
|
||||
%({)
|
||||
struct B;
|
4
test/indent/c-family/move-brace/out
Normal file
4
test/indent/c-family/move-brace/out
Normal file
|
@ -0,0 +1,4 @@
|
|||
namespace A
|
||||
|
||||
{
|
||||
struct B;
|
3
test/indent/c-family/move-brace/rc
Normal file
3
test/indent/c-family/move-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/core/c-family.kak"
|
||||
set buffer filetype cpp
|
Loading…
Reference in New Issue
Block a user