diff --git a/src/nnn.c b/src/nnn.c index b1052f9c2..ef31f19f9 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4385,6 +4385,7 @@ static void setcfg(settings newcfg) /* Synchronize the global function pointers to match the new cfg. */ entrycmpfn = cfg.reverse ? &reventrycmp : &entrycmp; namecmpfn = cfg.version ? &xstrverscasecmp : &xstricmp; + filterfn = cfg.regex ? &visible_re : &visible_str; } static void savecurctx(char *path, char *curname, int nextctx) @@ -4542,6 +4543,7 @@ static bool load_session(const char *sname, char **path, char **lastdir, char ** *path = g_ctx[cfg.curctx].c_path; *lastdir = g_ctx[cfg.curctx].c_last; *lastname = g_ctx[cfg.curctx].c_name; + setcfg(cfg); set_sort_flags('\0'); /* Set correct sort options */ xstrsncpy(curssn, sname ? sname : "@", NAME_MAX); status = TRUE;