aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/parser_spec.lua
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-01-29 15:53:34 -0800
committerRiley Bruins <ribru17@hotmail.com>2025-02-02 12:13:25 -0800
commit8543aa406c4ae88cc928372b2f8105005cdd0a80 (patch)
treeafec92c5aac4ac78ace7720926075fbb34a82a86 /test/functional/treesitter/parser_spec.lua
parent9508d6a8146350ffc9f31f4263fa871bab9130bf (diff)
downloadrneovim-8543aa406c4ae88cc928372b2f8105005cdd0a80.tar.gz
rneovim-8543aa406c4ae88cc928372b2f8105005cdd0a80.tar.bz2
rneovim-8543aa406c4ae88cc928372b2f8105005cdd0a80.zip
feat(treesitter): allow LanguageTree:is_valid() to accept a range
When given, only that range will be checked for validity rather than the entire tree. This is used in the highlighter to save CPU cycles since we only need to parse a certain region at a time anyway.
Diffstat (limited to 'test/functional/treesitter/parser_spec.lua')
-rw-r--r--test/functional/treesitter/parser_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua
index a6d3a340f7..eb4651a81d 100644
--- a/test/functional/treesitter/parser_spec.lua
+++ b/test/functional/treesitter/parser_spec.lua
@@ -633,7 +633,7 @@ int x = INT_MAX;
}, get_ranges())
n.feed('7ggI//<esc>')
- exec_lua([[parser:parse({6, 7})]])
+ exec_lua([[parser:parse({5, 6})]])
eq('table', exec_lua('return type(parser:children().c)'))
eq(2, exec_lua('return #parser:children().c:trees()'))
eq({