Pass the query_bufnr explicitly to get_node_text (#73)

Fixes https://github.com/nvim-treesitter/playground/issues/53
master
Santos Gallegos 2 years ago committed by GitHub
parent 9df82a27a4
commit 0198ef4a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -508,7 +508,7 @@ function M.update_query(bufnr, query_bufnr)
for capture_match in ts_query.iter_group_results(query_bufnr, "captures") do
table.insert(M._entries[bufnr].captures, capture_match.capture)
local capture = ts_utils.get_node_text(capture_match.capture.name.node)[1]
local capture = ts_utils.get_node_text(capture_match.capture.name.node, query_bufnr)[1]
if not capture_by_color[capture] then
capture_by_color[capture] = "TSPlaygroundCapture" .. index

Loading…
Cancel
Save