1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into osx-functional

This commit is contained in:
James Booth 2016-03-16 00:08:37 +00:00
commit 315575bd4a
2 changed files with 15 additions and 6 deletions

View File

@ -49,12 +49,21 @@ autocompleters_init(void)
void
autocompleters_add(const char *key, char **items)
{
if (g_hash_table_contains(autocompleters, key)) {
Autocomplete existing_ac = g_hash_table_lookup(autocompleters, key);
int i = 0;
for (i = 0; i < g_strv_length(items); i++) {
autocomplete_add(existing_ac, items[i]);
}
} else {
Autocomplete new_ac = autocomplete_new();
int i = 0;
for (i = 0; i < g_strv_length(items); i++) {
autocomplete_add(new_ac, items[i]);
}
g_hash_table_insert(autocompleters, strdup(key), new_ac);
}
}
char *

View File

@ -108,7 +108,7 @@ plugins_run_command(const char * const input)
PluginCommand *command = p_command->data;
if (g_strcmp0(split[0], command->command_name) == 0) {
gboolean result;
gchar **args = parse_args(input, command->min_args, command->max_args, &result);
gchar **args = parse_args_with_freetext(input, command->min_args, command->max_args, &result);
if (result == FALSE) {
ui_invalid_command_usage(command->command_name, NULL);
g_strfreev(split);