aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-29 02:31:48 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-29 03:19:15 +0530
commitdc7711271cb29d20b0d5ca34f876631885c131f4 (patch)
treef35e5c3dcaa513b5a18a682a0528c7466fbcae03 /src
parent8f3f64b5a67018a9414818cb67c10942ef01012f (diff)
downloadnnn-dc7711271cb29d20b0d5ca34f876631885c131f4.tar.gz
Fix sorting
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 20214a6..d541323 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4809,6 +4809,11 @@ static int set_sort_flags(int r)
break;
case 'v': /* Version */
namecmpfn = (namecmpfn == &xstrverscasecmp) ? &xstricmp : &xstrverscasecmp;
+ cfg.timeorder = 0;
+ cfg.sizeorder = 0;
+ cfg.apparentsz = 0;
+ cfg.blkorder = 0;
+ cfg.extnorder = 0;
break;
default:
return 0;
@@ -5678,7 +5683,8 @@ nochange:
if (r == 'd' || r == 'a')
goto begin;
- break;
+ qsort(dents, ndents, sizeof(*dents), entrycmpfn);
+ continue;
case SEL_STATS: // fallthrough
case SEL_CHMODX:
if (ndents) {