mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2024-12-28 07:19:16 -06:00
Merge pull request #224 from pnwatin/main
fix neovim freeze when closing a type_identifier
This commit is contained in:
commit
1cca23c9da
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user