Skip to content

Commit

Permalink
Do not skip automatic sorting even when editor tabs are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
konsolebox committed Jul 31, 2016
1 parent bb54fc1 commit b7ba772
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/notebook.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,10 @@ static void gradually_sort_tab(GeanyDocument *doc, NotebookTabSortMethod method)

static void on_document_open(GObject *obj, GeanyDocument *doc)
{
if (interface_prefs.show_notebook_tabs)
{
if (interface_prefs.auto_sort_tabs_by_filename)
gradually_sort_tab(doc, NOTEBOOK_TAB_SORT_BY_FILENAME);
else if (interface_prefs.auto_sort_tabs_by_pathname)
gradually_sort_tab(doc, NOTEBOOK_TAB_SORT_BY_PATHNAME);
}
if (interface_prefs.auto_sort_tabs_by_filename)
gradually_sort_tab(doc, NOTEBOOK_TAB_SORT_BY_FILENAME);
else if (interface_prefs.auto_sort_tabs_by_pathname)
gradually_sort_tab(doc, NOTEBOOK_TAB_SORT_BY_PATHNAME);
}


Expand All @@ -928,7 +925,7 @@ static void on_document_before_save(GObject *obj, GeanyDocument *doc)

static void on_document_save(GObject *obj, GeanyDocument *doc)
{
if (doc_saves_to_new_file && interface_prefs.show_notebook_tabs)
if (doc_saves_to_new_file)
{
if (interface_prefs.auto_sort_tabs_by_filename)
gradually_sort_tab(doc, NOTEBOOK_TAB_SORT_BY_FILENAME);
Expand Down

0 comments on commit b7ba772

Please sign in to comment.