mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Hover next file on delete
This commit is contained in:
parent
fc805dac26
commit
76cf0c65d4
14
src/nnn.c
14
src/nnn.c
|
@ -5700,18 +5700,22 @@ nochange:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == 'c') {
|
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);
|
mkpath(tmp, dents[cur].name, newpath);
|
||||||
xrm(newpath);
|
xrm(newpath);
|
||||||
|
|
||||||
if (cur && access(newpath, F_OK) == -1) {
|
if (cfg.filtermode)
|
||||||
move_cursor(cur - 1, 0);
|
presel = FILTER;
|
||||||
|
|
||||||
|
if (access(newpath, F_OK) == 0) /* File not removed */
|
||||||
|
goto nochange;
|
||||||
|
else if (cur) {
|
||||||
|
cur += (cur != (ndents - 1)) ? 1 : -1;
|
||||||
copycurname();
|
copycurname();
|
||||||
} else
|
} else
|
||||||
lastname[0] = '\0';
|
lastname[0] = '\0';
|
||||||
|
|
||||||
if (cfg.filtermode)
|
|
||||||
presel = FILTER;
|
|
||||||
goto begin;
|
goto begin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue