mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
config: Let mirroring be implicit unless values are rewritten.
This commit is contained in:
parent
72de752f84
commit
6d55be2043
@ -226,13 +226,6 @@ parse_set(struct option *opt_tree, struct conf_parsing_state *state,
|
||||
optname_copy = memacpy(optname_orig, optname_len);
|
||||
if (!optname_copy) return show_parse_error(state, ERROR_NOMEM);
|
||||
|
||||
/* Mirror what we already have */
|
||||
if (mirror) {
|
||||
add_bytes_to_string(mirror, state->mirrored,
|
||||
state->pos.look - state->mirrored);
|
||||
state->mirrored = state->pos.look;
|
||||
}
|
||||
|
||||
/* Option value */
|
||||
{
|
||||
struct option *opt;
|
||||
@ -286,6 +279,9 @@ parse_set(struct option *opt_tree, struct conf_parsing_state *state,
|
||||
else
|
||||
opt->flags |= OPT_WATERMARK;
|
||||
if (option_types[opt->type].write) {
|
||||
add_bytes_to_string(mirror, state->mirrored,
|
||||
pos_before_value.look
|
||||
- state->mirrored);
|
||||
option_types[opt->type].write(opt, mirror);
|
||||
state->mirrored = state->pos.look;
|
||||
}
|
||||
@ -323,13 +319,6 @@ parse_unset(struct option *opt_tree, struct conf_parsing_state *state,
|
||||
optname_copy = memacpy(optname_orig, optname_len);
|
||||
if (!optname_copy) return show_parse_error(state, ERROR_NOMEM);
|
||||
|
||||
/* Mirror what we have */
|
||||
if (mirror) {
|
||||
add_bytes_to_string(mirror, state->mirrored,
|
||||
state->pos.look - state->mirrored);
|
||||
state->mirrored = state->pos.look;
|
||||
}
|
||||
|
||||
{
|
||||
struct option *opt;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user