From: me Date: Tue, 21 Nov 2023 16:18:52 +0000 (+0300) Subject: When handling SEL_NEW pass `path` to `abspath` call X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=bca441e00f68cef66f20d8165ce2532d45dc7ab9;p=nnn.git When handling SEL_NEW pass `path` to `abspath` call If `path` is not provided to `abspath`, later will do `getcwd`, and it's result will differ from `path`. This causes problem that when creating directory inside path reached with symlink, subsequent call to get_cwd_entry does not recognize newly created path as subpath of current path, thus not selecting newly created element. --- diff --git a/src/nnn.c b/src/nnn.c index 5920797f..6c90377f 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7801,7 +7801,7 @@ nochange: } if (!(r == 's' || r == 'h')) { - tmp = abspath(tmp, NULL, newpath); + tmp = abspath(tmp, path, newpath); if (!tmp) { printwarn(&presel); goto nochange;