Merge pull request #224 from pnwatin/main

fix neovim freeze when closing a type_identifier
This commit is contained in:
Price Hiller 2024-12-02 12:31:53 -06:00 committed by GitHub
commit 1cca23c9da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,13 @@ local function is_in_template_tag()
local has_template_string = false
local current_node = cursor_node
local visited_nodes = {}
while not (has_element and has_template_string) and current_node do
local node_id = current_node:id()
if visited_nodes[node_id] then
break
end
visited_nodes[node_id] = true
if not has_element and current_node:type() == "element" then
has_element = true
end