mirror of
https://github.com/weechat/weechat.git
synced 2026-06-23 19:36:37 +02:00
script: fix up/down keys on /script buffer
Regression was introduced in commit 817d1eaf8e.
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user