From 8fc705d4ccf4c3bb0ca4067982cc879b5a9b6e92 Mon Sep 17 00:00:00 2001 From: Oleh Hushchenkov Date: Thu, 25 Jul 2019 09:58:33 +0300 Subject: [PATCH] Fix c-family indent on opening curly brace after if-else --- rc/filetype/c-family.kak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rc/filetype/c-family.kak b/rc/filetype/c-family.kak index 9a6d79e3..34efde8e 100644 --- a/rc/filetype/c-family.kak +++ b/rc/filetype/c-family.kak @@ -114,6 +114,8 @@ define-command -hidden c-family-indent-on-newline %< evaluate-commands -draft -i define-command -hidden c-family-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren try %[ execute-keys -draft -itersel h)M \A\(.*\)\h*\n\h*\{\z 1 ] + # align indent with opening paren when { is entered on a new line after the else + try %[ execute-keys -draft -itersel hK s \belse\b\h*(?://[^\n]+)?\n\h*\{ 1 ] ] define-command -hidden c-family-indent-on-closing-curly-brace %[