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:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user