mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 03:41:27 +00:00
Copy current name in API
This commit is contained in:
parent
1c6fd9c7d7
commit
7677cd4417
11
src/nnn.c
11
src/nnn.c
|
@ -2279,8 +2279,11 @@ end:
|
|||
if (*ch != 27 && *ch != '\t' && *ch != KEY_UP && *ch != KEY_DOWN && *ch != CONTROL('T')) {
|
||||
ln[0] = ln[1] = '\0';
|
||||
move_cursor(cur, 0);
|
||||
} else if (ndents)
|
||||
xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1);
|
||||
}
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
|
||||
curs_set(FALSE);
|
||||
settimeout();
|
||||
|
@ -5015,10 +5018,6 @@ nochange:
|
|||
#endif
|
||||
presel = filterentries(path, lastname);
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
|
||||
if (presel == 27) {
|
||||
presel = 0;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue