Skip to content

Commit

Permalink
fix(treesitter): break early from loop when match is found (#22499)
Browse files Browse the repository at this point in the history
Fixup to #22484.
  • Loading branch information
gpanders committed Mar 3, 2023
1 parent a88c18c commit bf90ceb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/lua/vim/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ function M.inspect_tree(opts)
for i, node in pg:iter() do
if node.id == id then
a.nvim_win_set_cursor(w, { i, col })
break
end
end
end,
Expand Down

0 comments on commit bf90ceb

Please sign in to comment.