diff --git a/src/nnn.c b/src/nnn.c index 250661f4..19e32cfd 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6329,9 +6329,12 @@ nochange: } if (strcmp(path, dir) == 0) { - if (cfg.filtermode) - presel = FILTER; - goto nochange; + if (dir == ipath) { + if (cfg.filtermode) + presel = FILTER; + goto nochange; + } + dir = lastdir; /* Go to last dir on home/root key repeat */ } if (chdir(dir) == -1) {