From: Arun Prakash Jana Date: Sat, 17 Jul 2021 07:35:37 +0000 (+0530) Subject: Use a simpler macro X-Git-Tag: v4.2~14 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0ef34a930cd3a8c875e8225059f9a359b8df273d;p=nnn.git Use a simpler macro --- diff --git a/src/nnn.c b/src/nnn.c index b5e6b26d..a4fab4da 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5225,7 +5225,7 @@ static bool handle_cmd(enum action sel, const char *current, char *newpath) { endselection(); - if (sel == SEL_RUNCMD) + if (sel == SEL_PROMPT) return prompt_run(current); if (sel == SEL_LAUNCH) @@ -7467,7 +7467,7 @@ nochange: goto begin; case SEL_SHELL: // fallthrough case SEL_LAUNCH: // fallthrough - case SEL_RUNCMD: + case SEL_PROMPT: r = handle_cmd(sel, (ndents ? pdents[cur].name : ""), newpath); /* Continue in type-to-nav mode, if enabled */ diff --git a/src/nnn.h b/src/nnn.h index 95d4fc34..6e934dfa 100644 --- a/src/nnn.h +++ b/src/nnn.h @@ -104,7 +104,7 @@ enum action { SEL_PLUGIN, SEL_SHELL, SEL_LAUNCH, - SEL_RUNCMD, + SEL_PROMPT, SEL_LOCK, SEL_SESSIONS, SEL_EXPORT, @@ -255,8 +255,8 @@ static struct key bindings[] = { { CONTROL(']'), SEL_SHELL }, /* Launcher */ { '=', SEL_LAUNCH }, - /* Run a command */ - { ']', SEL_RUNCMD }, + /* Show command prompt */ + { ']', SEL_PROMPT }, /* Lock screen */ { '0', SEL_LOCK }, /* Manage sessions */