aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-12-20 11:53:42 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-12-20 12:05:25 +0530
commitf25f0625376657956607d6b0e3392a648a86179e (patch)
tree96d39ab2617a29a0f5ac3f78be1cd2aa9e7ff50b /src/nnn.c
parent7d171368ad1059e9112d2542c70de0405fb2e6f1 (diff)
downloadnnn-f25f0625376657956607d6b0e3392a648a86179e.tar.gz
Mechanism to skip dir refresh after running plugin
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index cf2826f..a2608ed 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5259,6 +5259,12 @@ nochange:
goto nochange;
}
+ if (tmp[0] == '-' && tmp[1]) {
+ ++tmp;
+ r = FALSE; /* Do not refresh dir after completion */
+ } else
+ r = TRUE;
+
if (!run_selected_plugin(&path, tmp, newpath,
(ndents ? dents[cur].name : NULL),
&lastname, &lastdir)) {
@@ -5266,6 +5272,11 @@ nochange:
goto nochange;
}
+ if (!r) {
+ clearprompt();
+ goto nochange;
+ }
+
if (ndents)
copycurname();
} else {