]> Sergey Matveev's repositories - nnn.git/commitdiff
Avoid redundant printw() call for order
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Aug 2020 19:24:07 +0000 (00:54 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Aug 2020 19:24:07 +0000 (00:54 +0530)
src/nnn.c

index 08327a2165cff49b0ca4f84900743771cc38d5b4..b65573996f8507833a87fa265e912e33170f2272 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5188,9 +5188,8 @@ static void statusbar(char *path)
        } else { /* light or detail mode */
                char sort[] = "\0\0\0\0\0";
 
-               getorderstr(sort);
-
-               printw("%s", sort);
+               if (getorderstr(sort))
+                       printw("%s", sort);
 
                /* Timestamp */
                print_time(&pent->t);