aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-02 09:25:43 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-02 09:25:43 +0530
commit3f262910d3ecb98050817708ea8381664605bb10 (patch)
treeb0ea7699a9a35de5233e72edc1cc5c99ce15c191 /src
parent764c1fe60c3f5a44805c7f5e97bfcbff50763532 (diff)
downloadnnn-3f262910d3ecb98050817708ea8381664605bb10.tar.gz
Fix #219
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nnn.c b/src/nnn.c
index f8021fd..7f33c58 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -976,11 +976,11 @@ static void spawn(const char *file, const char *arg1, const char *arg2, const ch
arg2 = tmp;
}
- if (flag & F_NORMAL)
- exitcurses();
-
pid = fork();
if (pid == 0) {
+ if (flag & F_NORMAL)
+ exitcurses();
+
if (dir != NULL)
status = chdir(dir);
@@ -1017,8 +1017,11 @@ static void spawn(const char *file, const char *arg1, const char *arg2, const ch
DPRINTF_D(status);
DPRINTF_D(pid);
- if (flag & F_NORMAL)
+ if (flag & F_NORMAL) {
+ exitcurses();
+ initcurses();
refresh();
+ }
}
}