mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 17:56:41 +00:00
Use a simpler macro
This commit is contained in:
parent
07b627a725
commit
0ef34a930c
|
@ -5225,7 +5225,7 @@ static bool handle_cmd(enum action sel, const char *current, char *newpath)
|
||||||
{
|
{
|
||||||
endselection();
|
endselection();
|
||||||
|
|
||||||
if (sel == SEL_RUNCMD)
|
if (sel == SEL_PROMPT)
|
||||||
return prompt_run(current);
|
return prompt_run(current);
|
||||||
|
|
||||||
if (sel == SEL_LAUNCH)
|
if (sel == SEL_LAUNCH)
|
||||||
|
@ -7467,7 +7467,7 @@ nochange:
|
||||||
goto begin;
|
goto begin;
|
||||||
case SEL_SHELL: // fallthrough
|
case SEL_SHELL: // fallthrough
|
||||||
case SEL_LAUNCH: // fallthrough
|
case SEL_LAUNCH: // fallthrough
|
||||||
case SEL_RUNCMD:
|
case SEL_PROMPT:
|
||||||
r = handle_cmd(sel, (ndents ? pdents[cur].name : ""), newpath);
|
r = handle_cmd(sel, (ndents ? pdents[cur].name : ""), newpath);
|
||||||
|
|
||||||
/* Continue in type-to-nav mode, if enabled */
|
/* Continue in type-to-nav mode, if enabled */
|
||||||
|
|
|
@ -104,7 +104,7 @@ enum action {
|
||||||
SEL_PLUGIN,
|
SEL_PLUGIN,
|
||||||
SEL_SHELL,
|
SEL_SHELL,
|
||||||
SEL_LAUNCH,
|
SEL_LAUNCH,
|
||||||
SEL_RUNCMD,
|
SEL_PROMPT,
|
||||||
SEL_LOCK,
|
SEL_LOCK,
|
||||||
SEL_SESSIONS,
|
SEL_SESSIONS,
|
||||||
SEL_EXPORT,
|
SEL_EXPORT,
|
||||||
|
@ -255,8 +255,8 @@ static struct key bindings[] = {
|
||||||
{ CONTROL(']'), SEL_SHELL },
|
{ CONTROL(']'), SEL_SHELL },
|
||||||
/* Launcher */
|
/* Launcher */
|
||||||
{ '=', SEL_LAUNCH },
|
{ '=', SEL_LAUNCH },
|
||||||
/* Run a command */
|
/* Show command prompt */
|
||||||
{ ']', SEL_RUNCMD },
|
{ ']', SEL_PROMPT },
|
||||||
/* Lock screen */
|
/* Lock screen */
|
||||||
{ '0', SEL_LOCK },
|
{ '0', SEL_LOCK },
|
||||||
/* Manage sessions */
|
/* Manage sessions */
|
||||||
|
|
Loading…
Reference in a new issue