From: Arun Prakash Jana Date: Thu, 9 Sep 2021 03:35:45 +0000 (+0530) Subject: Reformat checks X-Git-Tag: v4.3~17 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9df7e5f03e60bceb27ebaa91ab7cefe80d05c43a;p=nnn.git Reformat checks --- diff --git a/src/nnn.c b/src/nnn.c index 82b3fcf8..a217d6b1 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6577,14 +6577,15 @@ begin: } #endif - if (cfgsort[cfg.curctx] == 'z') - set_sort_flags('c'); - if (order && (!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c')) - && ((r = get_kv_key(order, path, maxorder, NNN_ORDER)) > 0)) { - set_sort_flags(r); - cfgsort[cfg.curctx] = 'z'; - } - if (cfgsort[cfg.curctx] == '0') + if (cfgsort[cfg.curctx] != '0') { + if (cfgsort[cfg.curctx] == 'z') + set_sort_flags('c'); + if (order && (!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c')) + && ((r = get_kv_key(order, path, maxorder, NNN_ORDER)) > 0)) { + set_sort_flags(r); + cfgsort[cfg.curctx] = 'z'; + } + } else cfgsort[cfg.curctx] = cfgsort[CTX_MAX]; populate(path, lastname);