mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Highlight the last copied/moved file
This commit is contained in:
parent
d4b0ffa75e
commit
1e53cd8ea1
17
src/nnn.c
17
src/nnn.c
|
@ -4446,7 +4446,6 @@ static int dentfill(char *path, struct entry **dents)
|
||||||
dentp->size = sb.st_size;
|
dentp->size = sb.st_size;
|
||||||
#endif
|
#endif
|
||||||
dentp->flags = S_ISDIR(sb.st_mode) ? 0 : ((sb.st_nlink > 1) ? HARD_LINK : 0);
|
dentp->flags = S_ISDIR(sb.st_mode) ? 0 : ((sb.st_nlink > 1) ? HARD_LINK : 0);
|
||||||
DPRINTF_D(dentp->flags);
|
|
||||||
|
|
||||||
if (cfg.blkorder) {
|
if (cfg.blkorder) {
|
||||||
if (S_ISDIR(sb.st_mode)) {
|
if (S_ISDIR(sb.st_mode)) {
|
||||||
|
@ -5789,6 +5788,11 @@ nochange:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nselected == 1 && (sel == SEL_CP || sel == SEL_MV))
|
||||||
|
mkpath(path, xbasename(pselbuf), newpath);
|
||||||
|
else
|
||||||
|
newpath[0] = '\0';
|
||||||
|
|
||||||
endselection();
|
endselection();
|
||||||
|
|
||||||
if (!cpmvrm_selection(sel, path, &presel))
|
if (!cpmvrm_selection(sel, path, &presel))
|
||||||
|
@ -5797,10 +5801,15 @@ nochange:
|
||||||
clearfilter();
|
clearfilter();
|
||||||
|
|
||||||
/* Show notification on operation complete */
|
/* Show notification on operation complete */
|
||||||
if (cfg.x11)
|
if (cfg.x11) {
|
||||||
plugscript(utils[UTIL_NTFY], newpath, NULL, F_NOWAIT | F_NOTRACE);
|
/* rundir is used as tmp var, note that we MUST clear it again */
|
||||||
|
plugscript(utils[UTIL_NTFY], rundir, NULL, F_NOWAIT | F_NOTRACE);
|
||||||
|
rundir[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
if (ndents)
|
if (newpath[0])
|
||||||
|
xstrlcpy(lastname, xbasename(newpath), NAME_MAX+1);
|
||||||
|
else if (ndents)
|
||||||
copycurname();
|
copycurname();
|
||||||
goto begin;
|
goto begin;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue