nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5676dfe682c7cc4a0301f998b2b93c32a8551701
parent 735b3d6cde45cf4a049f2bc977005adde8617d05
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 27 Dec 2019 11:04:05 +0530

Fix: save last hovered filename in cur context post arrow movement

Diffstat:
Msrc/nnn.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -2859,9 +2859,12 @@ static void save_session(bool last_session, int *presel) header.pathln[i] = header.nameln[i] = header.lastln[i] = header.fltrln[i] = 0; } else { + if (cfg.curctx == i && ndents) + /* Update current file name, arrows don't update it */ + xstrlcpy(g_ctx[i].c_name, dents[cur].name, NAME_MAX + 1); header.pathln[i] = strnlen(g_ctx[i].c_path, PATH_MAX) + 1; - header.nameln[i] = strnlen(g_ctx[i].c_name, NAME_MAX) + 1; header.lastln[i] = strnlen(g_ctx[i].c_last, PATH_MAX) + 1; + header.nameln[i] = strnlen(g_ctx[i].c_name, NAME_MAX) + 1; header.fltrln[i] = strnlen(g_ctx[i].c_fltr, REGEX_MAX) + 1; } }