Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lua/treesitter-context/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ end
--- @return Range4[]?, string[]?
function M.get(winid)
winid = winid or api.nvim_get_current_win()

if not api.nvim_win_is_valid(winid) then
return
end
Comment on lines +323 to +325

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't do anything meaningful..

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't do anything meaningful..
it still has some effect—at least it solved the above error, haha


local bufnr = api.nvim_win_get_buf(winid)

-- vim.treesitter.get_parser() calls bufload(), but we don't actually want to load the buffer:
Expand Down
Loading