aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-01 22:30:32 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-01 22:30:32 +0530
commitda4f585188b960606783bfec4b9a53b09d7caa39 (patch)
tree0fcfdadea1371b55b1ea2a4b37f9f1f9905ff0c7 /src/nnn.c
parent897f01c2c31f3e1de51fc13e081d9d6d7356dbe3 (diff)
downloadnnn-da4f585188b960606783bfec4b9a53b09d7caa39.tar.gz
Fix #446
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index acc6512..e6305c1 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -531,7 +531,7 @@ static const char * const messages[] = {
"\nPress Enter to continue",
"open failed",
"dir inaccessible",
- "empty: use open with",
+ "empty: edit or open with",
"unsupported file",
"not set",
"entry exists",
@@ -3976,11 +3976,12 @@ static void show_help(const char *path)
"9o ^O Open with...%-12cn Create new/link\n"
"9f ^F File details%-12cd Detail view toggle\n"
"b^R Rename/dup%-14cr Batch rename\n"
- "cz Archive%-17c* Toggle exe\n"
+ "cz Archive%-17ce Edit in EDITOR\n"
"5Space ^J (Un)select%-11cm ^K Mark range/clear\n"
"9p ^P Copy sel here%-11ca Select all\n"
"9v ^V Move sel here%-8cw ^W Copy/move sel as\n"
- "9x ^X Delete%-18ce Edit sel\n"
+ "9x ^X Delete%-18cE Edit sel\n"
+ "c* Toggle exe%-0c\n"
"1MISC\n"
"9; ^S Select plugin%-11c= Launch app\n"
"9! ^] Shell%-19c] Cmd prompt\n"
@@ -5461,6 +5462,7 @@ nochange:
case SEL_REDRAW: // fallthrough
case SEL_RENAMEMUL: // fallthrough
case SEL_HELP: // fallthrough
+ case SEL_EDIT: // fallthrough
case SEL_LOCK:
{
bool refresh = FALSE;
@@ -5486,6 +5488,9 @@ nochange:
if (cfg.filtermode)
presel = FILTER;
continue;
+ case SEL_EDIT:
+ spawn(editor, dents[cur].name, NULL, path, F_CLI);
+ continue;
default: /* SEL_LOCK */
lock_terminal();
break;