summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-01-16 00:23:47 -0800
committerYuan Fu <casouri@gmail.com>2023-01-16 00:32:57 -0800
commit3d1e74c82a84d9b2c5ad45a377512b5ee83b8d47 (patch)
tree30e85e1b9d5340d7cba51aeff98adf1042763d82 /test/lisp/progmodes
parent352e41016bcaab8566347091b6b61908a9b57b57 (diff)
downloademacs-3d1e74c82a84d9b2c5ad45a377512b5ee83b8d47.tar.gz
emacs-3d1e74c82a84d9b2c5ad45a377512b5ee83b8d47.tar.bz2
emacs-3d1e74c82a84d9b2c5ad45a377512b5ee83b8d47.zip
Fix tree-sitter indent preset function (bug#60270)
* lisp/treesit.el (treesit-simple-indent-presets): Fix prev-adaptive-prefix so it doesn't return nil if the previous line has no prefix. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.
Diffstat (limited to 'test/lisp/progmodes')
-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 71524e273f3..70fce68b0ec 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
@@ -133,6 +133,20 @@ Name: Multiline Block Comments 4 (bug#60270)
*/
=-=-=
+Name: Multiline Block Comments 5 (bug#60270)
+
+=-=
+/*
+line one
+line 2
+ */
+=-=
+/*
+ line one
+ line 2
+ */
+=-=-=
+
Code:
(lambda ()