From cb7647a3ea5e6ce1bf939e05dcd982a432c62063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 25 Jun 2023 19:14:15 +0200 Subject: [PATCH] core: force key "return" to command "/input return" when migrating legacy keys --- ChangeLog.adoc | 7 +++++++ src/core/wee-config.c | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index c6c1929f2..4c8eeb956 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -10,6 +10,13 @@ This document lists all the changes for each version. + For a list of important changes that require manual actions, please look at release notes. +[[v4.0.1]] +== Version 4.0.1 (under dev) + +Bug fixes:: + + * core: force key "return" to command "/input return" when migrating legacy keys + [[v4.0.0]] == Version 4.0.0 (2023-06-24) 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); }