Copy current name in API

This commit is contained in:
Arun Prakash Jana 2020-01-19 10:49:40 +05:30
parent 1c6fd9c7d7
commit 7677cd4417
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -2279,8 +2279,11 @@ end:
if (*ch != 27 && *ch != '\t' && *ch != KEY_UP && *ch != KEY_DOWN && *ch != CONTROL('T')) { if (*ch != 27 && *ch != '\t' && *ch != KEY_UP && *ch != KEY_DOWN && *ch != CONTROL('T')) {
ln[0] = ln[1] = '\0'; ln[0] = ln[1] = '\0';
move_cursor(cur, 0); move_cursor(cur, 0);
} else if (ndents) }
xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1);
/* Save current */
if (ndents)
copycurname();
curs_set(FALSE); curs_set(FALSE);
settimeout(); settimeout();
@ -5015,10 +5018,6 @@ nochange:
#endif #endif
presel = filterentries(path, lastname); presel = filterentries(path, lastname);
/* Save current */
if (ndents)
copycurname();
if (presel == 27) { if (presel == 27) {
presel = 0; presel = 0;
break; break;