diff options
author | James Booth <boothj5@gmail.com> | 2016-07-05 22:11:58 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-05 22:11:58 +0100 |
commit | 82458c9d96a0d1a81b1d8d2b5232780fb653f2ae (patch) | |
tree | d25f0ef0376a8c446bbed9eb61351219e04eedee /src | |
parent | 97f79970252a06a1583ca1e1c8b22111720ddf94 (diff) | |
download | profani-tty-82458c9d96a0d1a81b1d8d2b5232780fb653f2ae.tar.gz |
Revert "Move adding plugins commands to autocompleters"
This reverts commit 97f79970252a06a1583ca1e1c8b22111720ddf94.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/api.c | 4 | ||||
-rw-r--r-- | src/plugins/callbacks.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/api.c b/src/plugins/api.c index e98e44d5..c8e6a166 100644 --- a/src/plugins/api.c +++ b/src/plugins/api.c @@ -52,7 +52,6 @@ #include "command/cmd_defs.h" #include "window_list.h" #include "common.h" -#include "command/cmd_ac.h" void api_cons_alert(void) @@ -145,9 +144,6 @@ api_register_command(const char *const plugin_name, const char *command_name, in command->help = help; callbacks_add_command(plugin_name, command); - - cmd_ac_add(command->command_name); - cmd_ac_add_help(&command->command_name[1]); } void diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c index 5af5d0bc..d313690b 100644 --- a/src/plugins/callbacks.c +++ b/src/plugins/callbacks.c @@ -36,6 +36,7 @@ #include <stdlib.h> #include "command/cmd_defs.h" +#include "command/cmd_ac.h" #include "plugins/callbacks.h" #include "plugins/plugins.h" #include "tools/autocomplete.h" @@ -165,6 +166,8 @@ callbacks_add_command(const char *const plugin_name, PluginCommand *command) g_hash_table_insert(command_hash, strdup(command->command_name), command); g_hash_table_insert(p_commands, strdup(plugin_name), command_hash); } + cmd_ac_add(command->command_name); + cmd_ac_add_help(&command->command_name[1]); } void |