1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

core: do not call check callback when setting default value of option

This commit is contained in:
Sébastien Helleu
2023-03-19 15:23:10 +01:00
parent d47d9c5ed5
commit 0f4ef874ca
2 changed files with 1 additions and 13 deletions
-12
View File
@@ -1864,18 +1864,6 @@ config_file_option_set_default (struct t_config_option *option,
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (option->callback_check_value)
{
if (!(int)(option->callback_check_value) (
option->callback_check_value_pointer,
option->callback_check_value_data,
option,
value))
{
return WEECHAT_CONFIG_OPTION_SET_ERROR;
}
}
if (value)
{
old_value_was_null = (option->default_value == NULL);
+1 -1
View File
@@ -915,7 +915,7 @@ TEST(CoreConfigFileWithNewOptions, OptionSetDefault)
/* string */
STRCMP_EQUAL("value", CONFIG_STRING_DEFAULT(ptr_option_str));
LONGS_EQUAL(WEECHAT_CONFIG_OPTION_SET_ERROR,
LONGS_EQUAL(WEECHAT_CONFIG_OPTION_SET_OK_CHANGED,
config_file_option_set_default (ptr_option_str, "xxx", 1));
LONGS_EQUAL(WEECHAT_CONFIG_OPTION_SET_OK_CHANGED,
config_file_option_set_default (ptr_option_str, "test", 1));