Skip to content

Commit

Permalink
Merge pull request #224 from pnwatin/main
Browse files Browse the repository at this point in the history
fix neovim freeze when closing a type_identifier
  • Loading branch information
PriceHiller authored Dec 2, 2024
2 parents f2d24ac + e451e0c commit 1cca23c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/nvim-ts-autotag/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1cca23c

Please sign in to comment.