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;
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.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1144/files/4f219bdad24610e674da26cf2dc97...