switch filterfn on ctx changes

this should fix more crashes related to switching between
contexts with different types of filters active. particularly
when switching from a regex filtered context to a string
filtered one.
This commit is contained in:
k-pop connoisseur 2024-12-15 05:24:52 +01:00 committed by NRK
parent 18dff24acc
commit a9093c6dd1

View file

@ -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)