src/nnn.c | 6 ++++-- diff --git a/src/nnn.c b/src/nnn.c index 95855c3f35180598fcea9c25bcedacf5b21ec1c2..53951b2d1ce3720d57cc9cee3c48a288042545e3 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -691,7 +691,6 @@ #endif /* __GNUC__ */ /* Forward declarations */ static size_t xstrlcpy(char *dest, const char *src, size_t n); -static int dentfill(char *path, struct entry **dents); static void redraw(char *path); static int spawn(char *file, char *arg1, char *arg2, const char *dir, uchar flag); static int (*nftw_fn)(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf); @@ -2493,8 +2492,9 @@ wint_t ch[2] = {0}; int r, total = ndents, len; char *pln = g_ctx[cfg.curctx].c_fltr + 1; + DPRINTF_S(__FUNCTION__); + if (ndents && (ln[0] == FILTER || ln[0] == RFILTER) && *pln) { - total = ndents = dentfill(path, &dents); if (matches(pln) != -1) { move_cursor(dentfind(lastname, ndents), 0); redraw(path); @@ -4378,6 +4378,8 @@ struct entry *dentp; size_t off = 0, namebuflen = NAMEBUF_INCR; struct stat sb_path, sb; DIR *dirp = opendir(path); + + DPRINTF_S(__FUNCTION__); if (!dirp) return 0;