commit e7aec90889a3e9fbf23962468701766fc2bd5429 parent 7f84fbc8a0262854ace2f63e357429723dc73f97 Author: Arun Prakash Jana <engineerarun@gmail.com> Date: Thu, 9 Sep 2021 18:05:24 +0530 Add early check Diffstat:
| M | src/nnn.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c @@ -6577,10 +6577,10 @@ begin: } #endif - if (cfgsort[cfg.curctx] != '0') { + if (order && cfgsort[cfg.curctx] != '0') { if (cfgsort[cfg.curctx] == 'z') set_sort_flags('c'); - if (order && (!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c')) + if ((!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';