<p><a href="https://github.com/elextr" class="user-mention">@elextr</a></p>
<blockquote>
<p>But neither is very useful when looking for a symbol or file that exists many times, such as a member like "length()" that exists on many classes or a file that exists in several directories. And those cases are the times I am more likely to actually want to search in the sidebar.</p>
</blockquote>
<p>Good point! This is <a href="https://github.com/vfaronov/geany/blob/0617c0e186de463e411b67ddb3331dbf8d519daa/src/sidebar.c#L128-L148">easy to do</a> in my paradigm as well, because the symbols treeview already stores the <code>TMTag *</code> in one of its columns. A possible UI is to split the search key on the current filetype’s scope separator (like <code>.</code> for Python, <code>::</code> for C++), then match the last part against <code>tmtag->name</code> and the preceding parts against <code>tmtag->scope</code>. Which gives us:</p>
<p><a href="https://cloud.githubusercontent.com/assets/300211/25397486/1598ff58-29f1-11e7-84dc-20602c8d015a.png" target="_blank"><img src="https://cloud.githubusercontent.com/assets/300211/25397486/1598ff58-29f1-11e7-84dc-20602c8d015a.png" alt="geany-fuzzy1" style="max-width:100%;"></a></p>
<p><a href="https://github.com/vfaronov/geany-plugins/blob/0e77388160ce2796fd2de771e0c26d8f95bd0210/treebrowser/src/treebrowser.c#L1674-L1691">Similarly in TreeBrowser</a>.</p>
<p>This only distinguishes the innermost level of nesting, so in the above example, <code>Foo.Meta.baz</code> would be matched by all of <code>f.b</code>, <code>f.m.b</code>, <code>m-f.b</code>. But I think this should often be enough.</p>
<p>Is this what you had in mind?</p>
<hr>
<p>Anyway I realized that <code>g_str_match_string</code> is in GLib since 2.40, while Geany only requires GLib >= 2.32. So this will have to wait until Geany bumps its GLib dependency (if ever). Or maybe it’s a good excuse to write a custom matching function handling BumpyCase as well.</p>

<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/issues/1466#issuecomment-297098124">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_7e3JEonwIvjFPSb88CDjfOKzoOks5rzigIgaJpZM4M-U95">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ6Stega5s9afQJqbGXwyuCXKgIKXks5rzigIgaJpZM4M-U95.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/issues/1466#issuecomment-297098124"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@vfaronov in #1466: @elextr \r\n\r\n\u003e But neither is very useful when looking for a symbol or file that exists many times, such as a member like \"length()\" that exists on many classes or a file that exists in several directories. And those cases are the times I am more likely to actually want to search in the sidebar.\r\n\r\nGood point! This is [easy to do](https://github.com/vfaronov/geany/blob/0617c0e186de463e411b67ddb3331dbf8d519daa/src/sidebar.c#L128-L148) in my paradigm as well, because the symbols treeview already stores the `TMTag *` in one of its columns. A possible UI is to split the search key on the current filetype’s scope separator (like `.` for Python, `::` for C++), then match the last part against `tmtag-\u003ename` and the preceding parts against `tmtag-\u003escope`. Which gives us:\r\n\r\n![geany-fuzzy1](https://cloud.githubusercontent.com/assets/300211/25397486/1598ff58-29f1-11e7-84dc-20602c8d015a.png)\r\n\r\n[Similarly in TreeBrowser](https://github.com/vfaronov/geany-plugins/blob/0e77388160ce2796fd2de771e0c26d8f95bd0210/treebrowser/src/treebrowser.c#L1674-L1691).\r\n\r\nThis only distinguishes the innermost level of nesting, so in the above example, `Foo.Meta.baz` would be matched by all of `f.b`, `f.m.b`, `m-f.b`. But I think this should often be enough.\r\n\r\nIs this what you had in mind?\r\n\r\n------\r\n\r\nAnyway I realized that `g_str_match_string` is in GLib since 2.40, while Geany only requires GLib \u003e= 2.32. So this will have to wait until Geany bumps its GLib dependency (if ever). Or maybe it’s a good excuse to write a custom matching function handling BumpyCase as well."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1466#issuecomment-297098124"}}}</script>