]> jfr.im git - irc/weechat/weechat.git/commitdiff
core: force key "return" to command "/input return" when migrating legacy keys
authorSébastien Helleu <redacted>
Sun, 25 Jun 2023 17:14:15 +0000 (19:14 +0200)
committerSébastien Helleu <redacted>
Sun, 25 Jun 2023 17:14:15 +0000 (19:14 +0200)
ChangeLog.adoc
src/core/wee-config.c

index c6c1929f2fd23661ab365f6747cc6c01ad6adda2..4c8eeb956c336ff919e04ef95d69ccd57335e3a2 100644 (file)
@@ -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)
 
index c88759afa08efa2b27ffc97a73df7bfddd24cbf4..7da423fa5e605e43217b14d515bd940a3f7dc7a3 100644 (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);
                 }