fix(#2568): hijack_cursor positions at top grouped node (#2569)

Co-authored-by: Azad <49314270+Akmadan23@users.noreply.github.com>
This commit is contained in:
Alexander Courtis
2023-12-10 10:13:22 +11:00
committed by GitHub
parent 27e66c2ea8
commit 0a7c24b675
2 changed files with 6 additions and 6 deletions

View File

@@ -149,12 +149,11 @@ function M.get_node_from_path(path)
:iterate()
end
--- Get the highest parent of grouped nodes
---@param node_ Node
---@return table
function M.get_parent_of_group(node_)
local node = node_
while node.parent and node.parent.group_next do
---Get the highest parent of grouped nodes
---@param node Node
---@return Node node or parent
function M.get_parent_of_group(node)
while node and node.parent and node.parent.group_next do
node = node.parent
end
return node