]> Sergey Matveev's repositories - nnn.git/commitdiff
Reformat checks
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Sep 2021 03:35:45 +0000 (09:05 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Sep 2021 03:36:09 +0000 (09:06 +0530)
src/nnn.c

index 82b3fcf85580053f58be3a0d8e40c83c71b070f4..a217d6b15f4f7f83390d42caaf66b32e667dc692 100644 (file)
--- 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);