On Wed Nov 9 22:45:39 2022 +0000, Esme Povirk wrote:
I had assumed the function was meant to find the next or previous sibling within the virtual tree. Can you explain what the function is supposed to do, without mentioning `traverse_uia_node_tree`?
It takes a passed in node, and does the following:
1. Attempt to navigate to the nodes sibling. 2. If no sibling is retrieved, and we're not at the root level, navigate to the parent. 3. Check if the parent is a part of the current virtual tree. If it is, stop and return no sibling. 4. If it's not, loop back to 1.
It first attempts to find an actual sibling from the node, and if it doesn't get one, it goes upwards and to the right looking for a sibling.
Maybe it would help clear things up if we removed the attempt to navigate to the sibling of the first node passed in, and just started at navigating towards the parent.