1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

config: In saving style 2, save deleted options too.

Previously, ELinks set the OPT_WATERMARK flag in all deleted options
when config.saving_style was 2, thus mostly preventing them from being
saved.  This had the unfortunate consequence that if you started with
no elinks.conf, set config.saving_style = 2, deleted some built-in
option (e.g. a URL rewriting rule), saved the settings, and restarted
ELinks, then the built-in option would reappear.
This commit is contained in:
Kalle Olavi Niemitalo 2008-02-03 13:19:05 +02:00 committed by Kalle Olavi Niemitalo
parent 6d55be2043
commit ab8ef9698f
3 changed files with 0 additions and 16 deletions

View File

@ -877,8 +877,6 @@ create_config_string(unsigned char *prefix, unsigned char *name,
touching = 0;
}
if (savestyle == 2) watermark_deleted_options(options->value.tree);
/* Scaring. */
if (savestyle == 2
|| (savestyle < 2

View File

@ -748,19 +748,6 @@ unmark_options_tree(LIST_OF(struct option) *tree)
}
}
void
watermark_deleted_options(LIST_OF(struct option) *tree)
{
struct option *option;
foreach (option, *tree) {
if (option->flags & OPT_DELETED)
option->flags |= OPT_WATERMARK;
else if (option->type == OPT_TREE)
watermark_deleted_options(option->value.tree);
}
}
static int
check_nonempty_tree(LIST_OF(struct option) *options)
{

View File

@ -162,7 +162,6 @@ extern void register_change_hooks(const struct change_hook_info *change_hooks);
extern LIST_OF(struct option) *init_options_tree(void);
extern void unmark_options_tree(LIST_OF(struct option) *);
void watermark_deleted_options(LIST_OF(struct option) *);
extern void smart_config_string(struct string *, int, int,
LIST_OF(struct option) *, unsigned char *, int,