You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening second buffer in a split and switching focus to previous buffer treesitter encounters an error.
Tested integrations
Markdown
Typst
For reason unknown to me only happens in typst integration
Resulting error
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/treesitter.lua:198: Index out of bounds
stack traceback:
[C]: in function 'nvim_buf_get_text'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:198: in function 'get_node_text'
/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:273: in function 'handler'
/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:767: in function 'fn'
/usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'match_preds'
/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:883: in function '(for generator)'
...re/nvim/lazy/image.nvim/lua/image/integrations/typst.lua:24: in function 'query_buffer_images'
.../share/nvim/lazy/image.nvim/lua/image/utils/document.lua:59: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Possible fix
Using local buf instead of 0 in query:iter_captures(root, 0) in affected integrations
The text was updated successfully, but these errors were encountered:
Description
When opening second buffer in a split and switching focus to previous buffer treesitter encounters an error.
Tested integrations
For reason unknown to me only happens in typst integration
Resulting error
Possible fix
Using local
buf
instead of0
inquery:iter_captures(root, 0)
in affected integrationsThe text was updated successfully, but these errors were encountered: