summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2023-04-10 02:58:46 +0300
committerDmitry Gutov <dgutov@yandex.ru>2023-04-10 02:58:46 +0300
commitdb8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e (patch)
tree49cb24a387626ba9d8592d999933700317517607 /test
parent589959fb09d8a8f60179e1cceca4c3777b8c7719 (diff)
downloademacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.tar.gz
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')
-rw-r--r--test/lisp/progmodes/c-ts-mode-resources/indent.erts14
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)
+{
+ |
+=-=-=