Thank you, I followed your suggestions as below:
1. add "prev_config_filter" in "ui.h", and init in filelist.c
2. in "vifm.c" after vifm initial finished, store the manual name filters set in vifmrc:
replace_string(&curr_view->prev_config_filter, matcher_get_expr(curr_view->manual_filter));
3. then in "name_filters_remove", add the below line after "name_filters_drop" to restore the name filters set in vifmrc:
replace_matcher(&view->manual_filter, view->prev_config_filter);
with the above change, after I run :filter to add new name filter, then run "zO", the newly added filter is removed, and the filter set in vifmrc persists as expected.
By the way, I have another question which needs your help:
when I run :filter command to filter some files, the initial filters set in "vifmrc" are all removed. This is not related with the above "prev_config_filter" change. It seems the rule that if new name filter is added, the old other filters will be removed.
Is there any easy way to persist the filters set in "vifmrc" when adding new filters by running :filter command.
Thanks a lot for taking your time.