1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

core: force key "return" to command "/input return" when migrating legacy keys

This commit is contained in:
Sébastien Helleu
2023-06-25 19:14:15 +02:00
parent 21292f7464
commit cb7647a3ea
2 changed files with 19 additions and 0 deletions
+12
View File
@@ -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);
}