summaryrefslogtreecommitdiff
path: root/rc/core
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-13 10:19:38 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-13 10:19:38 +0100
commite73cd78288272f7ce4e45f790f7284142c7c7e09 (patch)
tree29be0190cd845161de33f5ab68b9afa81c487491 /rc/core
parent98627726cfd29c0b883a61ce857f950d1b26cd12 (diff)
Fix corner case in C family indenting
Diffstat (limited to 'rc/core')
-rw-r--r--rc/core/c-family.kak4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak
index 2f9ab31f..3898efcb 100644
--- a/rc/core/c-family.kak
+++ b/rc/core/c-family.kak
@@ -49,9 +49,9 @@ def -hidden c-family-indent-on-newline %< eval -draft -itersel %<
# on a previous line if its followed by text on the same line
try %< eval -draft %<
# Go to opening parenthesis and opening brace, then select the most nested one
- try %< exec [bZ<a-\;>[B<a-z><gt> > catch %< exec [B >
+ try %< try %< exec [bZ<a-\;>[B<a-z><gt> > catch %< exec [B > >
# Validate selection and get first and last char
- exec <a-k>\`[{(](\h*\S+)+\n<ret> L s\`|.\'<ret>
+ exec <a-k>\`[{(](\h*\S+)+\n<ret> <a-:><a-\;>L s\`|.\'<ret>
# Remove eventual indent from new line
try %< exec -draft <space> <a-h> s\h+<ret> d >
# Now align that new line with the opening parenthesis/brace