From: Victor Fernandes Date: Sat, 2 Feb 2019 19:37:31 +0000 (+0100) Subject: fixed: sort_browser attribute modified after sorting X-Git-Tag: 2019-10-25~375 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c562ed6d06a468050b6a7ae03a8799e314ead45d;p=neomutt fixed: sort_browser attribute modified after sorting 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 --- diff --git a/browser.c b/browser.c index 5e4b8f412..88ed321cb 100644 --- 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; }