aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-07-07 07:29:38 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-07-07 07:29:38 +0530
commit6fa4978230becc487521c600cfc5ff3f132fb8d6 (patch)
tree572ee6ae0d2432bb4bdabf4ca166b749236d8777 /src
parent509f069818af696c4a144da2af2ec8f2655b89f1 (diff)
downloadnnn-6fa4978230becc487521c600cfc5ff3f132fb8d6.tar.gz
Pin dir when visitng target file in find and list
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 2d9b2c9..45dc18c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5666,6 +5666,10 @@ nochange:
goto nochange;
}
+ /* Pin current directory */
+ free(mark);
+ mark = xstrdup(path);
+
cdprep(lastdir, NULL, path, newpath)
? (presel = FILTER) : (watch = TRUE);
xstrsncpy(lastname, pdents[cur].name, NAME_MAX + 1);