diff options
Diffstat (limited to 'lisp/progmodes/c-ts-mode.el')
-rw-r--r-- | lisp/progmodes/c-ts-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 0b775b2d5c8..fdd962ff020 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -419,7 +419,9 @@ MODE is either `c' or `cpp'." ((parent-is "field_declaration_list") c-ts-mode--anchor-prev-sibling 0) ;; Statement in {} blocks. - ((match nil "compound_statement" nil 1 1) standalone-parent c-ts-mode-indent-offset) + ((or (match nil "compound_statement" nil 1 1) + (match null "compound_statement")) + standalone-parent c-ts-mode-indent-offset) ((parent-is "compound_statement") c-ts-mode--anchor-prev-sibling 0) ;; Opening bracket. ((node-is "compound_statement") standalone-parent c-ts-mode-indent-offset) |