From 9df7e5f03e60bceb27ebaa91ab7cefe80d05c43a Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 9 Sep 2021 09:05:45 +0530 Subject: [PATCH] Reformat checks --- src/nnn.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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); -- 2.48.1