diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-14 07:26:31 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-25 16:35:28 +0200 |
commit | c5e5818be85f5b4cb6dc2f3f3d945732d5796278 (patch) | |
tree | 4134728ab8a0c8f4b4bf233d33d304a02cab83cd /src | |
parent | ac3632c22fadc27676f9afe59f23994822de991f (diff) | |
download | weechat-c5e5818be85f5b4cb6dc2f3f3d945732d5796278.zip |
fset: fix input "v" in fset buffer, add input "p" to toggle plugins descriptions
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fset/fset-buffer.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c index e0c216d35..72a0a2450 100644 --- a/src/plugins/fset/fset-buffer.c +++ b/src/plugins/fset/fset-buffer.c @@ -805,21 +805,22 @@ fset_buffer_input_cb (const void *pointer, void *data, struct t_gui_buffer *buffer, const char *input_data) { - char *actions[][2] = { { "<<", "go 0" }, - { ">>", "go end" }, - { "<", "left" }, - { ">", "right" }, - { "t", "toggle" }, - { "-", "add -1" }, - { "+", "add 1" }, - { "r", "reset" }, - { "u", "unset" }, - { "s", "set" }, - { "a", "append" }, - { ",", "mark 1" }, - { "v", "toggle_bar" }, - { NULL, NULL } }; - char str_command[64]; + char *actions[][2] = { + { "<<", "/fset -go 0" }, + { ">>", "/fset -go end" }, + { "<", "/fset -left" }, + { ">", "/fset -right" }, + { "t", "/fset -toggle" }, + { "-", "/fset -add -1" }, + { "+", "/fset -add 1" }, + { "r", "/fset -reset" }, + { "u", "/fset -unset" }, + { "s", "/fset -set" }, + { "a", "/fset -append" }, + { ",", "/fset -mark 1" }, + { "p", "/mute /set fset.look.show_plugins_desc toggle", }, + { "v", "/mute /set fset.look.show_help_bar toggle" }, + { NULL, NULL } }; const char *ptr_input; int i; @@ -866,9 +867,7 @@ fset_buffer_input_cb (const void *pointer, void *data, { if (strcmp (input_data, actions[i][0]) == 0) { - snprintf (str_command, sizeof (str_command), - "/fset -%s", actions[i][1]); - weechat_command (buffer, str_command); + weechat_command (buffer, actions[i][1]); return WEECHAT_RC_OK; } } @@ -955,7 +954,7 @@ fset_buffer_set_keys () { "meta-v", "/mute /set fset.look.show_help_bar toggle" }, { NULL, NULL }, }; - char str_key[64], str_command[64]; + char str_key[64]; int i; for (i = 0; keys[i][0]; i++) @@ -963,8 +962,7 @@ fset_buffer_set_keys () if (weechat_config_boolean (fset_config_look_use_keys)) { snprintf (str_key, sizeof (str_key), "key_bind_%s", keys[i][0]); - snprintf (str_command, sizeof (str_command), "%s", keys[i][1]); - weechat_buffer_set (fset_buffer, str_key, str_command); + weechat_buffer_set (fset_buffer, str_key, keys[i][1]); } else { |