From 69431e49a9e0943912a15a83a8a29d5b4dd4598e Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 17 Apr 2021 20:25:58 +0530 Subject: [PATCH] Got to last dir on '~' or '/' key repeat --- src/nnn.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) {