nnn

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

commit e131f5f32b92d21e97c76e71129486ae31a596d8
parent da73d9ada93788bad37eb4648dfa2a0ac92c56ed
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Mon,  6 Jan 2025 18:42:01 +0530

Merge pull request #1970 from doremiyeon/filter_function_restore_on_session_load

filter function restore on session load
Diffstat:
Msrc/nnn.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -4409,6 +4409,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) @@ -4566,7 +4567,9 @@ 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; - set_sort_flags('\0'); /* Set correct sort options */ + /* Set correct sort and filter options */ + set_sort_flags('\0'); + filterfn = cfg.regex ? &visible_re : &visible_str; xstrsncpy(curssn, sname ? sname : "@", NAME_MAX); status = TRUE;