diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-11 23:44:44 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-17 18:52:30 +0100 |
commit | 3b8f9d4547df77e4c85b3b870ba21a67d97b31dc (patch) | |
tree | 32ba646d3d7fa05559bc81e2a0d31288912b74da /src/core/wee-config.c | |
parent | 042968b016721886125944040a0b6432c22a01e6 (diff) | |
download | weechat-3b8f9d4547df77e4c85b3b870ba21a67d97b31dc.zip |
core: check new keys manually added with /set
Diffstat (limited to 'src/core/wee-config.c')
-rw-r--r-- | src/core/wee-config.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index fdb00d645..2551bdefe 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -333,6 +333,7 @@ struct t_config_option *config_signal_sigusr2; /* other */ +int config_loading = 0; int config_length_nick_prefix_suffix = 0; int config_length_prefix_same_nick = 0; int config_length_prefix_same_nick_middle = 0; @@ -1627,7 +1628,9 @@ config_weechat_reload_cb (const void *pointer, void *data, /* remove all filters */ gui_filter_free_all (); + config_loading = 1; rc = config_file_reload (config_file); + config_loading = 0; config_weechat_init_after_read (); @@ -2666,7 +2669,19 @@ config_weechat_key_create_option_cb (const void *pointer, void *data, return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; context = config_weechat_get_key_context (section); - (void) gui_key_bind (NULL, context, option_name, value); + + if (config_loading) + { + /* don't check key when loading config */ + (void) gui_key_bind (NULL, context, option_name, value, 0); + } + else + { + /* enable verbose and check key if option is manually created */ + gui_key_verbose = 1; + (void) gui_key_bind (NULL, context, option_name, value, 1); + gui_key_verbose = 0; + } return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; } @@ -5052,7 +5067,9 @@ config_weechat_read () { int rc; + config_loading = 1; rc = config_file_read (weechat_config_file); + config_loading = 0; config_weechat_init_after_read (); |