diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-05-14 12:46:37 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-05-14 12:46:37 +0530 |
commit | 124666cb3854730657d490323e01eb1710a9b4f0 (patch) | |
tree | 216059f561905c135e6fb4e6c6f6ed05b17f7835 /src/nnn.c | |
parent | 23770ed049cca8fad8e06f3a4a5fcb4154b7ed9e (diff) | |
download | nnn-124666cb3854730657d490323e01eb1710a9b4f0.tar.gz |
Fix #571
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3391,7 +3391,11 @@ static void savecurctx(settings *curcfg, char *path, char *curname, int r /* nex bool selmode = cfg.selmode ? TRUE : FALSE; /* Save current context */ - xstrsncpy(g_ctx[cfg.curctx].c_name, curname, NAME_MAX + 1); + if (ndents) + xstrsncpy(g_ctx[cfg.curctx].c_name, curname, NAME_MAX + 1); + else + g_ctx[cfg.curctx].c_name[0] = '\0'; + g_ctx[cfg.curctx].c_cfg = cfg; if (ctxr->c_cfg.ctxactive) { /* Switch to saved context */ |