1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

[options] trigger option change with exmode. Refs #196

This commit is contained in:
Witold Filipczyk 2022-11-12 18:03:40 +01:00
parent b67ac8926a
commit b6271bae85

View File

@ -84,6 +84,7 @@ struct conf_parsing_state {
/** File name for error messages. If NULL then do not display
* error messages. */
const char *filename;
int exmode;
};
/** Tell the user about an error in the configuration file.
@ -347,6 +348,9 @@ parse_set_common(struct option *opt_tree, struct conf_parsing_state *state,
mem_free(val);
return show_parse_error(state, ERROR_VALUE);
}
if (state->exmode) {
option_changed(NULL, opt);
}
} else if (is_system_conf) {
/* scanning a file that will not be rewritten */
struct option *flagsite = indirect_option(opt);
@ -681,6 +685,7 @@ parse_config_exmode_command(char *cmd)
state.pos.line = 0;
state.mirrored = NULL; /* not read because mirror is NULL too */
state.filename = NULL; /* prevent error messages */
state.exmode = 1;
return parse_config_command(config_options, &state, NULL, 0);
}