diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-06-25 19:14:15 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-06-25 22:10:04 +0200 |
commit | 763b8ec05013f196c3f149e2194b396fd3f93bf0 (patch) | |
tree | 151edb10367674cce5651c5d88e122dac202225a /src/core | |
parent | 9d0d8231e8f4e84257ee04a655832df659df8716 (diff) | |
download | weechat-763b8ec05013f196c3f149e2194b396fd3f93bf0.zip |
core: force key "return" to command "/input return" when migrating legacy keys
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-config.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index c88759afa..7da423fa5 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -1612,6 +1612,18 @@ config_weechat_update_cb (const void *pointer, void *data, ptr_option, new_option); hashtable_set (data_read, "option", new_option); changes++; + if (ptr_section + && (strcmp (ptr_section, "key") == 0) + && (strcmp (new_option, "return") == 0) + && (!ptr_value + || (strcmp (ptr_value, "/input return") != 0))) + { + gui_chat_printf ( + NULL, + _("Command converted for key \"%s\": \"%s\" => \"%s\""), + "return", ptr_value, "/input return"); + hashtable_set (data_read, "value", "/input return"); + } } free (new_option); } |