mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 04:46:37 +02:00
core: remove sort on configuration files and sections
The sort was causing bugs because some options were missing while reading
other options, so the order of sections is important, they must not be
sorted.
This is a partial revert of commit 56f099bec6.
This commit is contained in:
@@ -206,7 +206,13 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name,
|
||||
new_config_file->sections = NULL;
|
||||
new_config_file->last_section = NULL;
|
||||
|
||||
config_file_config_insert (new_config_file);
|
||||
new_config_file->prev_config = last_config_file;
|
||||
new_config_file->next_config = NULL;
|
||||
if (config_files)
|
||||
last_config_file->next_config = new_config_file;
|
||||
else
|
||||
config_files = new_config_file;
|
||||
last_config_file = new_config_file;
|
||||
}
|
||||
|
||||
return new_config_file;
|
||||
@@ -351,7 +357,13 @@ config_file_new_section (struct t_config_file *config_file, const char *name,
|
||||
new_section->options = NULL;
|
||||
new_section->last_option = NULL;
|
||||
|
||||
config_file_section_insert_in_config (new_section);
|
||||
new_section->prev_section = config_file->last_section;
|
||||
new_section->next_section = NULL;
|
||||
if (config_file->sections)
|
||||
config_file->last_section->next_section = new_section;
|
||||
else
|
||||
config_file->sections = new_section;
|
||||
config_file->last_section = new_section;
|
||||
}
|
||||
|
||||
return new_section;
|
||||
|
||||
Reference in New Issue
Block a user