From e42a0847a2d59c5eba93e36ce7c6d1b7275dd621 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 17 Sep 2014 22:51:52 +0100 Subject: Added autocompletion for form list-single values --- src/command/command.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/command') diff --git a/src/command/command.c b/src/command/command.c index 0e6a6156..4c245c87 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1406,6 +1406,14 @@ cmd_reset_autocomplete() autocomplete_reset(join_property_ac); autocomplete_reset(room_ac); autocomplete_reset(form_ac); + + if (ui_current_win_type() == WIN_MUC_CONFIG) { + ProfWin *window = wins_get_current(); + if (window && window->form) { + form_reset_autocompleters(window->form); + } + } + bookmark_autocomplete_reset(); } @@ -2130,6 +2138,14 @@ _form_autocomplete(char *input, int *size) } // handle list-single (set) + if ((g_strcmp0(args[0], "set") == 0) && field_type == FIELD_LIST_SINGLE) { + Autocomplete ac = form_get_value_ac(form, tag); + found = autocomplete_param_with_ac(input, size, beginning->str, ac, TRUE); + g_string_free(beginning, TRUE); + if (found != NULL) { + return found; + } + } // handle list-multi (add, remove) -- cgit 1.4.1-2-gfad0