Allow previous autocompletion with shift tab
This commit is contained in:
@@ -129,7 +129,7 @@ autocompleters_filepath_add(const char *const plugin_name, const char *prefix)
|
||||
}
|
||||
|
||||
char*
|
||||
autocompleters_complete(const char * const input)
|
||||
autocompleters_complete(const char * const input, gboolean previous)
|
||||
{
|
||||
char *result = NULL;
|
||||
|
||||
@@ -141,7 +141,7 @@ autocompleters_complete(const char * const input)
|
||||
GList *keys = g_hash_table_get_keys(key_to_ac);
|
||||
GList *curr = keys;
|
||||
while (curr) {
|
||||
result = autocomplete_param_with_ac(input, curr->data, g_hash_table_lookup(key_to_ac, curr->data), TRUE);
|
||||
result = autocomplete_param_with_ac(input, curr->data, g_hash_table_lookup(key_to_ac, curr->data), TRUE, previous);
|
||||
if (result) {
|
||||
g_list_free(ac_hashes);
|
||||
g_list_free(keys);
|
||||
@@ -164,7 +164,7 @@ autocompleters_complete(const char * const input)
|
||||
while (curr_prefix) {
|
||||
char *prefix = curr_prefix->data;
|
||||
if (g_str_has_prefix(input, prefix)) {
|
||||
result = cmd_ac_complete_filepath(input, prefix);
|
||||
result = cmd_ac_complete_filepath(input, prefix, previous);
|
||||
if (result) {
|
||||
g_list_free(filepath_hashes);
|
||||
g_list_free(prefixes);
|
||||
|
||||
@@ -42,7 +42,7 @@ void autocompleters_add(const char *const plugin_name, const char *key, char **i
|
||||
void autocompleters_remove(const char *const plugin_name, const char *key, char **items);
|
||||
void autocompleters_clear(const char *const plugin_name, const char *key);
|
||||
void autocompleters_filepath_add(const char *const plugin_name, const char *prefix);
|
||||
char* autocompleters_complete(const char * const input);
|
||||
char* autocompleters_complete(const char * const input, gboolean previous);
|
||||
void autocompleters_reset(void);
|
||||
void autocompleters_destroy(void);
|
||||
|
||||
|
||||
@@ -369,9 +369,9 @@ plugins_loaded_list(void)
|
||||
}
|
||||
|
||||
char *
|
||||
plugins_autocomplete(const char * const input)
|
||||
plugins_autocomplete(const char * const input, gboolean previous)
|
||||
{
|
||||
return autocompleters_complete(input);
|
||||
return autocompleters_complete(input, previous);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -108,7 +108,7 @@ typedef struct prof_plugin_t {
|
||||
void plugins_init(void);
|
||||
GSList *plugins_unloaded_list(void);
|
||||
GList *plugins_loaded_list(void);
|
||||
char* plugins_autocomplete(const char *const input);
|
||||
char* plugins_autocomplete(const char *const input, gboolean previous);
|
||||
void plugins_reset_autocomplete(void);
|
||||
void plugins_shutdown(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user