<p>When merging <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="216577615" data-permission-text="Issue title is private" data-url="https://github.com/geany/geany/issues/1445" data-hovercard-type="pull_request" data-hovercard-url="/geany/geany/pull/1445/hovercard" href="https://github.com/geany/geany/pull/1445">#1445</a> we found that the results could be improved.</p>
<p>I promised to fix the deficient results along with proper unit tests so here we go.</p>
<p>Basically utils_strv_shorten_file_list() can repaired and simplified at the same time by a relatively minor change to the supprting utils_strv_find_lcs(). This is all backed up by new unit tests which tests the related functions plus (now reborn) utils_strv_new().</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/2262'>https://github.com/geany/geany/pull/2262</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>tests: unit test for some util strv functions</li>
  <li>utils: refactor utils_strv_shorten_file_list() and friends</li>
  <li>utils: fix suboptimal elipsis substitution by utils_strv_shorten_file_list()</li>
  <li>utils: move utils_strv_shorten_file_list() out of GEANY_PRIVATE</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2262/files#diff-0">src/utils.c</a>
    (129)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2262/files#diff-1">src/utils.h</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2262/files#diff-2">tests/Makefile.am</a>
    (11)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/geany/geany/pull/2262/files#diff-3">tests/test_utils.c</a>
    (419)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/2262.patch'>https://github.com/geany/geany/pull/2262.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/2262.diff'>https://github.com/geany/geany/pull/2262.diff</a></li>
</ul>

<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/2262?email_source=notifications&email_token=AAIOWJZXUZTR4XX4N5DBR23QE4LCPA5CNFSM4IMM6B22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFXRQQQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ6KDSTJTIDUTRXAFU3QE4LCPANCNFSM4IMM6B2Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ54ZOXPSOEMABZRWETQE4LCPA5CNFSM4IMM6B22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFXRQQQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2262?email_source=notifications\u0026email_token=AAIOWJZXUZTR4XX4N5DBR23QE4LCPA5CNFSM4IMM6B22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFXRQQQ",
"url": "https://github.com/geany/geany/pull/2262?email_source=notifications\u0026email_token=AAIOWJZXUZTR4XX4N5DBR23QE4LCPA5CNFSM4IMM6B22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFXRQQQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>