diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-08 10:42:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-08 10:47:46 +0200 |
commit | 2c251cd285cc33e5a94cd4cd84f81f3f91c407cf (patch) | |
tree | de5d6676f352c151c78197c74a335bac4547d524 /src/plugins | |
parent | 7fd20269e784befcea10b308e9640ed7715379af (diff) | |
download | weechat-2c251cd285cc33e5a94cd4cd84f81f3f91c407cf.zip |
script: fix up/down keys on /script buffer
Regression was introduced in commit 817d1eaf8e0be700bf9b61dcbaf9db7ab507d3af.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/script/script-buffer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index 08f45a02f..801f17b6c 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -1094,6 +1094,8 @@ void script_buffer_set_keys (struct t_hashtable *hashtable) { char *keys[][2] = { + { "up", "up" }, + { "down", "down" }, { "meta-A", "toggleautoload" }, { "meta-l", "load" }, { "meta-u", "unload" }, @@ -1108,11 +1110,11 @@ script_buffer_set_keys (struct t_hashtable *hashtable) char str_key[64], str_command[64]; int i; - weechat_buffer_set (script_buffer, "key_bind_up", "/script up"); - weechat_buffer_set (script_buffer, "key_bind_down", "/script down"); for (i = 0; keys[i][0]; i++) { - if (weechat_config_boolean (script_config_look_use_keys)) + if (weechat_config_boolean (script_config_look_use_keys) + || (strcmp (keys[i][1], "up") == 0) + || (strcmp (keys[i][1], "down") == 0)) { snprintf (str_key, sizeof (str_key), "key_bind_%s", keys[i][0]); snprintf (str_command, sizeof (str_command), "/script %s", keys[i][1]); |