aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-28 02:02:23 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-28 02:02:23 +0530
commit2f61b0910dec004ba612fa6238ed8a2c4b9fe485 (patch)
tree14da1259fd292d0bf7c9a5fb6e37fd4826a4f50d /src
parentdf264fa6cd44d3d280c1b4be5813461a4f2506c8 (diff)
downloadnnn-2f61b0910dec004ba612fa6238ed8a2c4b9fe485.tar.gz
Cycle time, size, clear order at sort prompt with ^T
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index be25850..800b88c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -584,7 +584,7 @@ static const char * const messages[] = {
"plugin keys:",
"bookmark keys:",
"invalid regex",
- "'a'u / 'd'u / 'e'xtn / 'r'ev / 's'ize / 't'ime / 'v'er / 'c'lear?",
+ "'a'u / 'd'u / 'e'xtn / 'r'ev / 's'ize / 't'ime / 'v'er / 'c'lr / '^T' (cycle)?",
"unmount failed! try lazy?",
"first file (\')/char?",
"remove tmp file?",
@@ -5348,6 +5348,14 @@ static int set_sort_flags(int r)
if (cfg.reverse)
entrycmpfn = &reventrycmp;
+ } else if ( r == CONTROL('T')) {
+ /* Cycling order: clear -> size -> time -> clear */
+ if (cfg.timeorder)
+ r = 's';
+ else if (cfg.sizeorder)
+ r = 'c';
+ else
+ r = 't';
}
switch (r) {