diff options
Diffstat (limited to 'src/plugins/autocompleters.c')
-rw-r--r-- | src/plugins/autocompleters.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/autocompleters.c b/src/plugins/autocompleters.c index 9acbf755..b6877c4e 100644 --- a/src/plugins/autocompleters.c +++ b/src/plugins/autocompleters.c @@ -66,6 +66,20 @@ autocompleters_add(const char *key, char **items) } } +void +autocompleters_remove(const char *key, char **items) +{ + if (!g_hash_table_contains(autocompleters, key)) { + return; + } + + Autocomplete ac = g_hash_table_lookup(autocompleters, key); + int i = 0; + for (i = 0; i < g_strv_length(items); i++) { + autocomplete_remove(ac, items[i]); + } +} + char * autocompleters_complete(const char * const input) { |