mirror of
https://github.com/jarun/nnn.git
synced 2025-01-26 02:36:36 +00:00
Keep lastname directory selected
incase the user just lost access, it would be better to remember the selected directory to keep it highlighted.
This commit is contained in:
parent
78ada7a8bc
commit
d640de2589
|
@ -3301,6 +3301,9 @@ nochange:
|
||||||
if (access(path, F_OK)) {
|
if (access(path, F_OK)) {
|
||||||
DPRINTF_S("dir deleted or moved");
|
DPRINTF_S("dir deleted or moved");
|
||||||
|
|
||||||
|
/* Save history */
|
||||||
|
xstrlcpy(lastname, xbasename(path), NAME_MAX + 1);
|
||||||
|
|
||||||
xstrlcpy(newpath, path, PATH_MAX);
|
xstrlcpy(newpath, path, PATH_MAX);
|
||||||
while (true) {
|
while (true) {
|
||||||
dir = visit_parent(path, newpath, &presel);
|
dir = visit_parent(path, newpath, &presel);
|
||||||
|
|
Loading…
Reference in a new issue