mirror of
https://github.com/jarun/nnn.git
synced 2025-02-17 14:54:36 +00:00
Fix #173
This commit is contained in:
parent
1e932c24a7
commit
a3517b28dc
13
src/nnn.c
13
src/nnn.c
|
@ -396,6 +396,7 @@ static const char messages[][16] = {
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void redraw(char *path);
|
static void redraw(char *path);
|
||||||
|
static void spawn(const char *file, const char *arg1, const char *arg2, const char *dir, uchar flag);
|
||||||
static char *get_output(char *buf, size_t bytes, char *file, char *arg1, char *arg2, bool page);
|
static char *get_output(char *buf, size_t bytes, char *file, char *arg1, char *arg2, bool page);
|
||||||
int (*nftw_fn) (const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
|
int (*nftw_fn) (const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
|
||||||
|
|
||||||
|
@ -771,11 +772,9 @@ static bool showcplist()
|
||||||
pos = selectiontofd(fd);
|
pos = selectiontofd(fd);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
exitcurses();
|
|
||||||
if (pos && pos == copybufpos)
|
if (pos && pos == copybufpos)
|
||||||
get_output(NULL, 0, "cat", g_tmpfpath, NULL, TRUE);
|
spawn(pager, pager_arg, g_tmpfpath, NULL, F_NORMAL);
|
||||||
unlink(g_tmpfpath);
|
unlink(g_tmpfpath);
|
||||||
refresh();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1965,10 +1964,8 @@ static bool show_stats(char *fpath, char *fname, struct stat *sb)
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
exitcurses();
|
spawn(pager, pager_arg, g_tmpfpath, NULL, F_NORMAL);
|
||||||
get_output(NULL, 0, "cat", g_tmpfpath, NULL, TRUE);
|
|
||||||
unlink(g_tmpfpath);
|
unlink(g_tmpfpath);
|
||||||
refresh();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2132,10 +2129,8 @@ static bool show_help(char *path)
|
||||||
dprintf(fd, "\nVersion: %s\n%s\n", VERSION, GENERAL_INFO);
|
dprintf(fd, "\nVersion: %s\n%s\n", VERSION, GENERAL_INFO);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
exitcurses();
|
spawn(pager, pager_arg, g_tmpfpath, NULL, F_NORMAL);
|
||||||
get_output(NULL, 0, "cat", g_tmpfpath, NULL, TRUE);
|
|
||||||
unlink(g_tmpfpath);
|
unlink(g_tmpfpath);
|
||||||
refresh();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue