nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 76cf0c65d433f5c694ea2fb4c4edb183f7518e58
parent fc805dac2665041dd8f614bdd01cfd0974d4fc76
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 28 Feb 2020 07:34:02 +0530

Hover next file on delete

Diffstat:
Msrc/nnn.c | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -5700,18 +5700,22 @@ nochange: } if (r == 'c') { - tmp = (g_listpath && xstrcmp(path, g_listpath) == 0) ? g_prefixpath : path; + tmp = (g_listpath && xstrcmp(path, g_listpath) == 0) + ? g_prefixpath : path; mkpath(tmp, dents[cur].name, newpath); xrm(newpath); - if (cur && access(newpath, F_OK) == -1) { - move_cursor(cur - 1, 0); + if (cfg.filtermode) + presel = FILTER; + + if (access(newpath, F_OK) == 0) /* File not removed */ + goto nochange; + else if (cur) { + cur += (cur != (ndents - 1)) ? 1 : -1; copycurname(); } else lastname[0] = '\0'; - if (cfg.filtermode) - presel = FILTER; goto begin; } }