diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-07-04 19:10:04 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-07-04 19:10:04 +0200 |
commit | 20560f0a63369c90f4a7ed58d0f2537b1e5c9b55 (patch) | |
tree | f4ba06983f4f4c8334f6b8e0c60e31515f834a8f /src/core | |
parent | e36b066dc83682fdccc5a0392173647ad4da9c2c (diff) | |
download | weechat-20560f0a63369c90f4a7ed58d0f2537b1e5c9b55.zip |
core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-config.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 7da423fa5..2d15577e0 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -1601,7 +1601,23 @@ config_weechat_update_cb (const void *pointer, void *data, } else { - new_option = gui_key_legacy_to_alias (ptr_option); + /* + * if backspace or ctrl-backspace was manually bound to a + * different command, keep the key as-is (in lower case) ; + * in all other cases, convert the key to the new name + */ + if (ptr_section + && (strcmp (ptr_section, "key") == 0) + && ((strcmp (ptr_option, "ctrl-H") == 0) + || (strcmp (ptr_option, "ctrl-?") == 0)) + && (strcmp (ptr_value, "/input delete_previous_char") != 0)) + { + new_option = string_tolower (ptr_option); + } + else + { + new_option = gui_key_legacy_to_alias (ptr_option); + } if (new_option) { if (strcmp (ptr_option, new_option) != 0) |