<p>In <a href="https://github.com/geany/geany/pull/1144#discussion_r71978473">src/notebook.c</a>:</p>
<pre style='color:#555'>> +            else if (interface_prefs.auto_sort_tabs_pathname)
> +                  notebook_sort_tabs(NOTEBOOK_TAB_SORT_PATHNAME);
> +  }
> +
> +  on_idle_auto_sort_hooked = FALSE;
> +  return FALSE;
> +}
> +
> +
> +static gboolean on_document_open(GeanyDocument* doc)
> +{
> +  if (!on_idle_auto_sort_hooked && interface_prefs.show_notebook_tabs &&
> +          (interface_prefs.auto_sort_tabs_filename || interface_prefs.auto_sort_tabs_pathname))
> +  {
> +          if (g_idle_add(on_idle_auto_sort_tabs, NULL) > 0)
> +                  on_idle_auto_sort_hooked = TRUE;
</pre>
<p>wouldn't it be better to only sort the new document?  In case someone changed sorting, it would probably not be expected that opening a new file re-sorts everything.  It would also likely be cheaper, simply walking the list once finding the appropriate new position.</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/files/4f219bdad24610e674da26cf2dc97d7d8a10b8c8#r71978473">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJxTCXTkgDQvhYWdZRVWBB0W7Lea1ks5qYoaagaJpZM4JQxCD">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJyRFvD-uwS-YeXBKe40lJ2b5hexVks5qYoaagaJpZM4JQxCD.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/files/4f219bdad24610e674da26cf2dc97d7d8a10b8c8#r71978473"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>