nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 45ac90d5e66fe59bb88e5d64dbe9451c2edd60b1
parent 9a949b7c339487e6b297dad187d83953d3bdc811
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Tue, 18 May 2021 00:48:36 +0530

Exit nnn if plugin picks files

Diffstat:
Msrc/nnn.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -6330,12 +6330,17 @@ nochange: xstrsncpy(path, rundir, PATH_MAX); rundir[0] = '\0'; + bool picker = g_state.picker; + if (chdir(path) == -1 || !run_selected_plugin(&path, pent->name, runfile, &lastname, &lastdir)) { DPRINTF_S("plugin failed!"); } + if (picker != g_state.picker) + return EXIT_SUCCESS; + if (runfile[0]) runfile[0] = '\0'; clearfilter(); @@ -7050,12 +7055,17 @@ nochange: } else r = TRUE; + bool picker = g_state.picker; + if (!run_selected_plugin(&path, tmp, (ndents ? pdents[cur].name : NULL), &lastname, &lastdir)) { printwait(messages[MSG_FAILED], &presel); goto nochange; } + if (picker != g_state.picker) + return EXIT_SUCCESS; + if (ndents) copycurname();