mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[options] trigger option change with exmode. Refs #196
This commit is contained in:
parent
b67ac8926a
commit
b6271bae85
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user