aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-02-25 14:17:29 +0100
committerChristian Clason <ch.clason+github@icloud.com>2025-02-25 16:21:16 +0100
commitc3337e357a838aadf0ac40dd5bbc4dd0d1909b32 (patch)
treea9e85f32ef497797e30e7bb0d1ecd4218f9aa2e8 /test
parent3bdc3a1689477e1b4944919edfdf495b81c0724e (diff)
downloadrneovim-c3337e357a838aadf0ac40dd5bbc4dd0d1909b32.tar.gz
rneovim-c3337e357a838aadf0ac40dd5bbc4dd0d1909b32.tar.bz2
rneovim-c3337e357a838aadf0ac40dd5bbc4dd0d1909b32.zip
fix(treesitter): nil check query for has_conceal_line
Diffstat (limited to 'test')
-rw-r--r--test/functional/treesitter/highlight_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua
index c59160d8c7..6d59368a24 100644
--- a/test/functional/treesitter/highlight_spec.lua
+++ b/test/functional/treesitter/highlight_spec.lua
@@ -1298,3 +1298,16 @@ it('starting and stopping treesitter highlight in init.lua works #29541', functi
-- legacy syntax highlighting is used
screen:expect(hl_grid_legacy_c)
end)
+
+it('no nil index for missing highlight query', function()
+ clear()
+ local cqueries = vim.uv.cwd() .. '/runtime/queries/c/'
+ os.rename(cqueries .. 'highlights.scm', cqueries .. '_highlights.scm')
+ finally(function()
+ os.rename(cqueries .. '_highlights.scm', cqueries .. 'highlights.scm')
+ end)
+ exec_lua([[
+ local parser = vim.treesitter.get_parser(0, 'c')
+ vim.treesitter.highlighter.new(parser)
+ ]])
+end)