mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Exit nnn if plugin picks files
This commit is contained in:
parent
9a949b7c33
commit
45ac90d5e6
10
src/nnn.c
10
src/nnn.c
|
@ -6330,12 +6330,17 @@ nochange:
|
||||||
xstrsncpy(path, rundir, PATH_MAX);
|
xstrsncpy(path, rundir, PATH_MAX);
|
||||||
rundir[0] = '\0';
|
rundir[0] = '\0';
|
||||||
|
|
||||||
|
bool picker = g_state.picker;
|
||||||
|
|
||||||
if (chdir(path) == -1
|
if (chdir(path) == -1
|
||||||
|| !run_selected_plugin(&path, pent->name,
|
|| !run_selected_plugin(&path, pent->name,
|
||||||
runfile, &lastname, &lastdir)) {
|
runfile, &lastname, &lastdir)) {
|
||||||
DPRINTF_S("plugin failed!");
|
DPRINTF_S("plugin failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (picker != g_state.picker)
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
|
||||||
if (runfile[0])
|
if (runfile[0])
|
||||||
runfile[0] = '\0';
|
runfile[0] = '\0';
|
||||||
clearfilter();
|
clearfilter();
|
||||||
|
@ -7050,12 +7055,17 @@ nochange:
|
||||||
} else
|
} else
|
||||||
r = TRUE;
|
r = TRUE;
|
||||||
|
|
||||||
|
bool picker = g_state.picker;
|
||||||
|
|
||||||
if (!run_selected_plugin(&path, tmp, (ndents ? pdents[cur].name : NULL),
|
if (!run_selected_plugin(&path, tmp, (ndents ? pdents[cur].name : NULL),
|
||||||
&lastname, &lastdir)) {
|
&lastname, &lastdir)) {
|
||||||
printwait(messages[MSG_FAILED], &presel);
|
printwait(messages[MSG_FAILED], &presel);
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (picker != g_state.picker)
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
|
||||||
if (ndents)
|
if (ndents)
|
||||||
copycurname();
|
copycurname();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue