<p>I gave this PR a brief spin. Linux and Windows, GTK+2 and GTK+3, a few realistic and contrived examples.</p>
<hr>
<p><strong>Bug:</strong> on Windows, if one of the pathnames to be rendered in the popup is too long, it is considered empty. This happens before the removal of common prefixes, so it looks like this:</p>
<p><a href="https://user-images.githubusercontent.com/300211/27780482-d975321e-5fd1-11e7-8087-4ade43a57f0f.png" target="_blank"><img src="https://user-images.githubusercontent.com/300211/27780482-d975321e-5fd1-11e7-8087-4ade43a57f0f.png" alt="geany-goto-popup-cut" style="max-width:100%;"></a></p>
<p>This first line “: 1” actually refers to a very long pathname. If I click it, Geany successfully jumps to the symbol in that pathname, but also prints this to the console:</p>
<pre><code>Geany: utils_tidy_path: assertion 'g_path_is_absolute(filename)' failed
</code></pre>
<p>So what is a “very long pathname”? Here is an example:</p>
<pre><code>C:\Users\Vasiliy\Downloads\Первая папка\В ней много интересного\Приколов не счесть\Всякое разное 1234567890\Ещё больше 1234567890\Последний уровень вло\Ор выше гор.c
</code></pre>
<p>As you can see, it’s 165 characters long, but in UTF-8 it would be 261 bytes long. Now this is the minimum length where the problem happens. If I remove any <strong>1 Cyrillic</strong> or any <strong>2 Latin</strong> characters from anywhere in this pathname, it is rendered as expected.</p>
<p>I could not reproduce this problem with ASCII-only pathnames, probably because Windows prevented me from creating a pathname longer than 255 characters.</p>
<p>I could not reproduce this problem on Linux.</p>
<hr>
<p>When common substrings are ellipsized, Geany now prints messages to the console, like this:</p>
<pre><code>p 0 Вторая папка/.../Тест.c
p 1 Первая папка/.../Тест.c
</code></pre>
<p>I think this should be either removed or made more understandable.</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/1445#issuecomment-312561434">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ5UWYeLadFtcAJvAjjuISX86Wx1tks5sKIx8gaJpZM4MnYrc">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ761lklT2q6k0RFeynLDIAUJ8M0Jks5sKIx8gaJpZM4MnYrc.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/1445#issuecomment-312561434"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request 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 #1445: I gave this PR a brief spin. Linux and Windows, GTK+2 and GTK+3, a few realistic and contrived examples.\r\n\r\n-----------------------------------------------\r\n\r\n**Bug:** on Windows, if one of the pathnames to be rendered in the popup is too long, it is considered empty. This happens before the removal of common prefixes, so it looks like this:\r\n\r\n![geany-goto-popup-cut](https://user-images.githubusercontent.com/300211/27780482-d975321e-5fd1-11e7-8087-4ade43a57f0f.png)\r\n\r\nThis first line “: 1” actually refers to a very long pathname. If I click it, Geany successfully jumps to the symbol in that pathname, but also prints this to the console:\r\n\r\n    Geany: utils_tidy_path: assertion 'g_path_is_absolute(filename)' failed\r\n\r\nSo what is a “very long pathname”? Here is an example:\r\n\r\n    C:\\Users\\Vasiliy\\Downloads\\Первая папка\\В ней много интересного\\Приколов не счесть\\Всякое разное 1234567890\\Ещё больше 1234567890\\Последний уровень вло\\Ор выше гор.c\r\n\r\nAs you can see, it’s 165 characters long, but in UTF-8 it would be 261 bytes long. Now this is the minimum length where the problem happens. If I remove any **1 Cyrillic** or any **2 Latin** characters from anywhere in this pathname, it is rendered as expected.\r\n\r\nI could not reproduce this problem with ASCII-only pathnames, probably because Windows prevented me from creating a pathname longer than 255 characters.\r\n\r\nI could not reproduce this problem on Linux.\r\n\r\n-----------------------------------------------\r\n\r\nWhen common substrings are ellipsized, Geany now prints messages to the console, like this:\r\n\r\n```\r\np 0 Вторая папка/.../Тест.c\r\np 1 Первая папка/.../Тест.c\r\n```\r\n\r\nI think this should be either removed or made more understandable."}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1445#issuecomment-312561434"}}}</script>