aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-12-08 02:40:04 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-12-08 02:40:04 +0530
commit2c2f1e5eae164cfe7d53f0954235231125d2f90a (patch)
tree544ae5ad8c642526d003ded2fa29b7a72556df84
parentbdea298bb59566931a788626454d5d7f25eb467f (diff)
downloadnnn-2c2f1e5eae164cfe7d53f0954235231125d2f90a.tar.gz
Combine more cases
-rw-r--r--src/nnn.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a11f637..1f7c4a3 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2929,7 +2929,10 @@ nochange:
case SEL_LIST: // fallthrough
case SEL_EXTRACT: // fallthrough
case SEL_MEDIA: // fallthrough
- case SEL_FMEDIA:
+ case SEL_FMEDIA: // fallthrough
+ case SEL_RUNEDIT: // fallthrough
+ case SEL_RUNPAGE: // fallthrough
+ case SEL_LOCK:
{
if (!ndents)
break;
@@ -2949,6 +2952,18 @@ nochange:
case SEL_EXTRACT:
r = handle_archive(newpath, "-x", path);
break;
+ case SEL_RUNEDIT:
+ r = 0;
+ spawn(editor, editor_arg, dents[cur].name, path, F_NORMAL);
+ break;
+ case SEL_RUNPAGE:
+ r = 0;
+ spawn(pager, pager_arg, dents[cur].name, path, F_NORMAL);
+ break;
+ case SEL_LOCK:
+ r = 0;
+ spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL | F_SIGINT);
+ break;
default:
r = 0;
break;
@@ -3408,15 +3423,6 @@ nochange:
/* Repopulate as directory content may have changed */
goto begin;
- case SEL_RUNEDIT:
- spawn(editor, editor_arg, dents[cur].name, path, F_NORMAL);
- break;
- case SEL_RUNPAGE:
- spawn(pager, pager_arg, dents[cur].name, path, F_NORMAL);
- break;
- case SEL_LOCK:
- spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL | F_SIGINT);
- break;
case SEL_QUITCD: // fallthrough
case SEL_QUIT:
for (r = 0; r < CTX_MAX; ++r)