mirror of
https://github.com/neovim/neovim.git
synced 2026-08-01 05:09:08 +00:00
Problem: The table `history` in treesitter/_select.lua stores references
to previously selected TSNodes, but a TSNode needs to keep its
whole TSTree alive in memory, which may be kept alive even
after closing the buffer to which this history corresponds.
Solution: Store just the bits of information from the TSNode we need to
go back in selection history (the range and ID), without
referencing the TSNode itself.
(cherry picked from commit bcfc2037ef)