diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-04-10 02:58:46 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2023-04-10 02:58:46 +0300 |
commit | db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e (patch) | |
tree | 49cb24a387626ba9d8592d999933700317517607 /test/lisp/progmodes/c-ts-mode-resources | |
parent | 589959fb09d8a8f60179e1cceca4c3777b8c7719 (diff) | |
download | emacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.tar.gz emacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.tar.bz2 emacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.zip |
Fix some cases of incomplete code's indentation [c/c++-ts-mode]
* lisp/progmodes/c-ts-mode.el (c-ts-base--before-indent): Try to
guess when the parse tree is incomplete, and provide a better node
to indent against (bug#62717).
(c-ts-base-mode): Set up advice for local treesit-indent-function.
Diffstat (limited to 'test/lisp/progmodes/c-ts-mode-resources')
-rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 5cdefe2122c..221b3d809af 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -464,3 +464,17 @@ main (void) | } =-=-= + +Name: Empty Line (Block Start) + +=-= +int +main (void) +{ +| +=-= +int +main (void) +{ + | +=-=-= |