From 825effb26487521f0d2ac243ff175174af836e50 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 18 Jun 2021 20:19:27 +0530 Subject: [PATCH] Fix broken window due to double spawn --- src/nnn.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 1c993838..4a939dc0 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4856,14 +4856,10 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch flags = F_MULTI | F_CONFIRM; ++file; - /* Check if output should be paged */ - if (*file == '|') { + if (*file == '|') { /* Check if output should be paged */ flags |= F_PAGE; ++file; - } - - /* Check if GUI flags are to be used */ - if (*file == '&') { + } else if (*file == '&') { /* Check if GUI flags are to be used */ flags = F_NOTRACE | F_NOWAIT; ++file; } @@ -4871,7 +4867,7 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch if (!*file) return FALSE; - if (flags & F_NOTRACE) { + if ((flags & F_NOTRACE) || (flags & F_PAGE)) { run_cmd_as_plugin(file, runfile, flags); return TRUE; }