<p>Take a look at <a href="https://github.com/geany/geany/commit/b1528f01e240379c0f75ae0c2f50829b271c0f30" class="commit-link"><tt>b1528f0</tt></a>. AFAICT (and IMO) it doesn't make the behavior worse, and is a lot simpler.  It alters several things to make them simpler, not only getting the document's base name.</p>

<p>And if really it needs to be the exact same as the sidebar, the code should indeed be shared rather than copied.</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/pull/1144#issuecomment-236371970">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJxaAeRO6pp-f655umN9YGrqjroFiks5qa3A2gaJpZM4JQxCD">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJwygj-xHzzCk4UiQC4t33mfPgyvFks5qa3A2gaJpZM4JQxCD.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/1144#issuecomment-236371970"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>