From f9b7913656f9e4728a1140b61ddb7f07009e28e6 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 7 Mar 2023 16:35:23 -0800 Subject: Fix empty line indentation in c-ts-mode (bug#61997) * lisp/progmodes/c-ts-mode.el: (c-ts-mode--indent-styles): Handle the empty line case. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test. * doc/lispref/modes.texi (Parser-based Indentation): Update manual. * lisp/treesit.el (treesit-simple-indent-presets): Support null as a value for NODE-TYPE in the 'match' matcher. --- test/lisp/progmodes/c-ts-mode-resources/indent.erts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/lisp/progmodes/c-ts-mode-resources') diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 77bfeb5ad6e..9e28ef203fd 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -418,3 +418,19 @@ required_matrix_height (struct window *w) | } =-=-= + +Name: Empty Line + +=-= +int +main (void) +{ +| +} +=-= +int +main (void) +{ + | +} +=-=-= -- cgit v1.2.3