aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-25 22:42:27 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-25 22:42:36 +0530
commit9c148d5789806059df05ad038ccb563735574395 (patch)
tree41506e662c780291b14943c6e795ec1e4ee91b13
parent7cc113ec989906ff7e25f7a1f7d0f3d27efa9430 (diff)
downloadnnn-9c148d5789806059df05ad038ccb563735574395.tar.gz
Combine SEL_ASIZE with related cases
-rw-r--r--src/nnn.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 3de4372..d9b7a50 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3152,6 +3152,7 @@ nochange:
case SEL_TOGGLEDOT: // fallthrough
case SEL_DETAIL: // fallthrough
case SEL_FSIZE: // fallthrough
+ case SEL_ASIZE: // fallthrough
case SEL_BSIZE: // fallthrough
case SEL_MTIME:
switch (sel) {
@@ -3179,6 +3180,15 @@ nochange:
cfg.blkorder = 0;
cfg.copymode = 0;
break;
+ case SEL_ASIZE:
+ cfg.apparentsz ^= 1;
+ if (cfg.apparentsz) {
+ nftw_fn = &sum_sizes;
+ cfg.blkorder = 1;
+ BLK_SHIFT = 0;
+ } else
+ cfg.blkorder = 0;
+ break;
case SEL_BSIZE:
if (sel == SEL_BSIZE) {
if (!cfg.apparentsz)
@@ -3304,14 +3314,6 @@ nochange:
/* Repopulate as directory content may have changed */
goto begin;
}
- case SEL_ASIZE:
- cfg.apparentsz ^= 1;
- if (cfg.apparentsz) {
- nftw_fn = &sum_sizes;
- cfg.blkorder = 1;
- BLK_SHIFT = 0;
- } else
- cfg.blkorder = 0; // fallthrough
case SEL_COPY:
if (!ndents)
goto nochange;