<p>In <a href="https://github.com/geany/geany/pull/797#discussion_r48275413">src/symbols.c</a>:</p>
<pre style='color:#555'>> {
> - GList *node;
> - foreach_list(node, *list)
> - g_slice_free(GtkTreeIter, node->data);
> - g_list_free(*list);
> - g_slice_free1(sizeof *list, list);
> + TreeSearchData user_data = {-1, line, TRUE};
> +
> + /* search parent candidates for the one with the nearest
> + * line number which is lower than the tag's line number */
> + g_tree_search(tree, (GCompareFunc)tree_search_func, &user_data);
> + parent_search = g_tree_lookup(tree, GINT_TO_POINTER(user_data.found_line));
</pre>
<p>same, shouldn't this be only done if search matched?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/797/files#r48275413">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9F2dobGjbK6U-bj70YUbxJ_K72bks5pSX0FgaJpZM4G0Ju3.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/geany/geany/pull/797/files#r48275413"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>