mirror of
https://github.com/jarun/nnn.git
synced 2025-03-10 00:39:25 +00:00
More checks
This commit is contained in:
parent
27e1eb54c4
commit
aea97cf3a7
1 changed files with 16 additions and 12 deletions
|
@ -4198,8 +4198,10 @@ static void savecurctx(char *path, char *curname, int nextctx)
|
||||||
if (ctxr->c_cfg.ctxactive) { /* Switch to saved context */
|
if (ctxr->c_cfg.ctxactive) { /* Switch to saved context */
|
||||||
tmpcfg = ctxr->c_cfg;
|
tmpcfg = ctxr->c_cfg;
|
||||||
/* Skip ordering an open context */
|
/* Skip ordering an open context */
|
||||||
|
if (order) {
|
||||||
cfgsort[CTX_MAX] = cfgsort[nextctx];
|
cfgsort[CTX_MAX] = cfgsort[nextctx];
|
||||||
cfgsort[nextctx] = '0';
|
cfgsort[nextctx] = '0';
|
||||||
|
}
|
||||||
} else { /* Set up a new context from current context */
|
} else { /* Set up a new context from current context */
|
||||||
ctxr->c_cfg.ctxactive = 1;
|
ctxr->c_cfg.ctxactive = 1;
|
||||||
xstrsncpy(ctxr->c_path, path, PATH_MAX);
|
xstrsncpy(ctxr->c_path, path, PATH_MAX);
|
||||||
|
@ -6577,7 +6579,8 @@ begin:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (order && cfgsort[cfg.curctx] != '0') {
|
if (order) {
|
||||||
|
if (cfgsort[cfg.curctx] != '0') {
|
||||||
if (cfgsort[cfg.curctx] == 'z')
|
if (cfgsort[cfg.curctx] == 'z')
|
||||||
set_sort_flags('c');
|
set_sort_flags('c');
|
||||||
if ((!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c'))
|
if ((!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c'))
|
||||||
|
@ -6587,6 +6590,7 @@ begin:
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
cfgsort[cfg.curctx] = cfgsort[CTX_MAX];
|
cfgsort[cfg.curctx] = cfgsort[CTX_MAX];
|
||||||
|
}
|
||||||
|
|
||||||
populate(path, lastname);
|
populate(path, lastname);
|
||||||
if (g_state.interrupt) {
|
if (g_state.interrupt) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue