mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 14:14:03 +02:00
fix(nighly): use get_hl_from_capture for nightly, instead of hl_cache
This commit is contained in:
parent
e6e71047bb
commit
ba4289ad34
1 changed files with 6 additions and 2 deletions
|
@ -150,8 +150,12 @@ local function highlight_contexts(bufnr, ctx_bufnr, contexts)
|
|||
if nsrow >= start_row then
|
||||
local msrow = offset + (nsrow - start_row)
|
||||
local merow = offset + (nerow - start_row)
|
||||
|
||||
local hl = buf_query.hl_cache[capture]
|
||||
local hl --- @type integer
|
||||
if buf_query.get_hl_from_capture then
|
||||
hl = buf_query:get_hl_from_capture(capture)
|
||||
else
|
||||
hl = buf_query.hl_cache[capture]
|
||||
end
|
||||
local priority = tonumber(metadata.priority) or vim.highlight.priorities.treesitter
|
||||
add_extmark(ctx_bufnr, msrow, nscol, {
|
||||
end_row = merow,
|
||||
|
|
Loading…
Reference in a new issue