<p dir="auto">This patch fixes symbol tree construction when <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="742770322" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/2657" data-hovercard-type="pull_request" data-hovercard-url="/geany/geany/pull/2657/hovercard" href="https://github.com/geany/geany/pull/2657">#2657</a> is applied.</p>
<p dir="auto">When a filter for tags is used for the symbol tree, it may happen that<br>
parent tags in the symbol tree are removed because they don't match<br>
the filter. Such tags are still visualised nicely by the symbol tree<br>
which shows these tags with full scope like</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="MissingStruct::some_member
"><pre><code>MissingStruct::some_member
</code></pre></div>
<p dir="auto">However, the current code doesn't expect that it may happen that<br>
<code>MissingStruct</code> re-appears in the results when filter is deleted. In such<br>
case <code>some_member</code> isn't re-parented under <code>MissingStruct</code> and stays<br>
displayed in the above format.</p>
<p dir="auto">This patch simply removes tags like <code>MissingStruct::some_member</code> for<br>
which parent hasn't been constructed yet from the symbol tree and re-adds<br>
them in the "insertion pass" for the symbol tree update code.</p>
<p dir="auto">The only change this patch does is that it replaces</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="if (parent_name && ! g_hash_table_lookup(parents_table, parent_name))
    parent_name = NULL;
"><pre><code>if (parent_name && ! g_hash_table_lookup(parents_table, parent_name))
    parent_name = NULL;
</code></pre></div>
<p dir="auto">with</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="if (parent_name && ! g_hash_table_lookup(parents_table, parent_name))
    cont = tree_store_remove_row(store, &iter);
else
{
"><pre><code>if (parent_name && ! g_hash_table_lookup(parents_table, parent_name))
    cont = tree_store_remove_row(store, &iter);
else
{
</code></pre></div>
<p dir="auto">The rest is just indentation after the <code>else</code>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/3050'>https://github.com/geany/geany/pull/3050</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/geany/geany/pull/3050/commits/3ca0bd251f1762805f6f359568c05f1ce2e0bce1" class="commit-link">3ca0bd2</a>  Fix setting parents in symbol tree when filtering is used</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/geany/geany/pull/3050/files">1 file</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/3050/files#diff-57618d7b5e160a906f23885f8c59d06d88a517be568cbd428366e24b58c13fe5">src/symbols.c</a>
    (50)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/3050.patch'>https://github.com/geany/geany/pull/3050.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/3050.diff'>https://github.com/geany/geany/pull/3050.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3050">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZXDQSGDIJ7237A3RDUQDRDVANCNFSM5JXBAGCQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ3IXHXMQ5SNAOKQZ23UQDRDVA5CNFSM5JXBAGC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QA7XSKA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3050",
"url": "https://github.com/geany/geany/pull/3050",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>