><br>
 > path     current result     my expectation<br>
 > |/src/a/app-1.2.3/src/lib/module/source.c|<br>
 > |a/app-1.2.3/src/lib/module/source.c| |a/app-1.2.3/src/lib/.../source.c|<br>
 > |/src/b/app-2.2.3/src/module/source.c|<br>
 > |b/app-2.2.3/src/module/source.c| |b/app-2.2.3/src/.../source.c|<br>
 ><br>
<br>
Damn. What happens is that the code determines `.2.3/src/` to be the <br>
longest common substring (longer that the expected `/module/`). Then<br>
it reduces it to directory components, giving only `src`. This<br>
is shorter than the threshold of 5 chars, so in the end nothing is <br>
ellipsized. It works if you change /module/ to /moduleXX/.<br>
<br>
Fixing this isn't trivial, and without proper unit tests there is a risk <br>
to break previously working cases.<br>
<br>
I suggest to accept the behavior for now (and merge) and I'll follow up <br>
with a fix + unit tests. But I would hate if this doesn't make it into <br>
the release just because of select (edge) cases because the status quo <br>
is just plain unusable for me. In fact I've been using this patch at <br>
work for ages where I have real-world cases and I never came across <br>
issues like this.<br>
<br>
Thanks for looking into it again!<br>
<br>


<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-439298755">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJyFbkqpjkOxovHgOCmRZhiFTKiJuks5uvl-mgaJpZM4MnYrc">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ7Ix-40hWuCyIwPTmqM_rbo3dxiYks5uvl-mgaJpZM4MnYrc.gif" height="1" width="1" alt="" /></p>
<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://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kugel- in #1445:  \u003e\n \u003e path     current result     my expectation\n \u003e |/src/a/app-1.2.3/src/lib/module/source.c|\n \u003e |a/app-1.2.3/src/lib/module/source.c| |a/app-1.2.3/src/lib/.../source.c|\n \u003e |/src/b/app-2.2.3/src/module/source.c|\n \u003e |b/app-2.2.3/src/module/source.c| |b/app-2.2.3/src/.../source.c|\n \u003e\n\nDamn. What happens is that the code determines `.2.3/src/` to be the \nlongest common substring (longer that the expected `/module/`). Then\nit reduces it to directory components, giving only `src`. This\nis shorter than the threshold of 5 chars, so in the end nothing is \nellipsized. It works if you change /module/ to /moduleXX/.\n\nFixing this isn't trivial, and without proper unit tests there is a risk \nto break previously working cases.\n\nI suggest to accept the behavior for now (and merge) and I'll follow up \nwith a fix + unit tests. But I would hate if this doesn't make it into \nthe release just because of select (edge) cases because the status quo \nis just plain unusable for me. In fact I've been using this patch at \nwork for ages where I have real-world cases and I never came across \nissues like this.\n\nThanks for looking into it again!\n\n"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1445#issuecomment-439298755"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/1445#issuecomment-439298755",
"url": "https://github.com/geany/geany/pull/1445#issuecomment-439298755",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany] Improve goto-symbols popup (#1445)",
"sections": [
{
"text": "",
"activityTitle": "**Thomas Martitz**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@kugel-",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1445,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"geany/geany\",\n\"pullRequestId\": 1445\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany/pull/1445#issuecomment-439298755"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 211651292\n}"
}
],
"themeColor": "26292E"
}
]</script>