]> granicus.if.org Git - neomutt/commitdiff
fixed: sort_browser attribute modified after sorting
authorVictor Fernandes <criw@pm.me>
Sat, 2 Feb 2019 19:37:31 +0000 (20:37 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 7 Feb 2019 14:06:29 +0000 (14:06 +0000)
sort_browser has modified after calling browser_sort,
which means the first time sort is called it uses the old
sort method instead of the new one.

Fixes #1551

browser.c

index 5e4b8f412d5c1ea6e2f7eea604d4f5675b0f2390..88ed321cbb34e22744b45ab827af1f688078dc1d 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1799,11 +1799,15 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
         if (resort)
         {
           sort |= reverse ? SORT_REVERSE : 0;
+          cs_str_native_set(Config, "sort_browser", sort, NULL);
           browser_sort(&state);
           browser_highlight_default(&state, menu);
           menu->redraw = REDRAW_FULL;
         }
-        cs_str_native_set(Config, "sort_browser", sort, NULL);
+        else
+        {
+          cs_str_native_set(Config, "sort_browser", sort, NULL);
+        }
         break;
       }