<p>In <a href="https://github.com/geany/geany/pull/923#discussion_r55068886">src/symbols.c</a>:</p>
<pre style='color:#555'>> @@ -2094,6 +2095,30 @@ static gboolean goto_tag(const gchar *name, gboolean definition)
> g_ptr_array_add(workspace_tags, tmtag);
> }
>
> + /* If there are typedefs of e.g. a struct such as "typedef struct Foo {} Foo;",
> + * keep just one of the names in the list - when the cursor is on the struct
> + * name, keep the typename, otherwise keep the struct name. Also remove tags
> + * that are at the cursor location. */
> + last_tag = NULL;
> + filtered_tags = g_ptr_array_new();
> + foreach_ptr_array(tmtag, i, workspace_tags)
> + {
> + if (last_tag != NULL && last_tag->file == tmtag->file &&
> + last_tag->type != tm_tag_typedef_t && tmtag->type == tm_tag_typedef_t)
> + {
> + if (last_tag->line == current_line)
> + /* if cursor on struct, replace struct with the typedef */
> + filtered_tags->pdata[filtered_tags->len-1] = tmtag;
</pre>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/src/symbols.c b/src/symbols.c</span>
index 56e2982..e8d6fc9 100644
<span class="pl-md">--- a/src/symbols.c</span>
<span class="pl-mi1">+++ b/src/symbols.c</span>
<span class="pl-mdr">@@ -2104,7 +2104,8 @@</span> static gboolean goto_tag(const gchar *name, gboolean definition)
foreach_ptr_array(tmtag, i, workspace_tags)
{
if (last_tag != NULL && last_tag->file == tmtag->file &&
<span class="pl-md">- last_tag->type != tm_tag_typedef_t && tmtag->type == tm_tag_typedef_t)</span>
<span class="pl-mi1">+ last_tag->type != tm_tag_typedef_t && tmtag->type == tm_tag_typedef_t &&</span>
<span class="pl-mi1">+ filtered_tags->len > 0)</span>
{
if (last_tag->line == current_line)
/* if cursor on struct, replace struct with the typedef */</pre></div>
<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/923/files#r55068886">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ2jcRAd1e0L9c2FDvE3pKjcl5ehvks5pqHrEgaJpZM4HlaDx.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/923/files#r55068886"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>