about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-17 23:34:48 +0100
committerJames Booth <boothj5@gmail.com>2014-09-17 23:36:10 +0100
commita905ce18a3419ccdec86334d624eeef38691b2b6 (patch)
tree040e131004e69785d488c51f61740229541e7351 /src/command/command.c
parent45ba6f1feded1c1ece03c85401b959adc8bbd93a (diff)
downloadprofani-tty-a905ce18a3419ccdec86334d624eeef38691b2b6.tar.gz
Added autocompletion for jid-multi form fields
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 536ce854..b579fdcf 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -2169,6 +2169,14 @@ _form_autocomplete(char *input, int *size)
                 }
 
                 // handle jid-multi (remove)
+                if ((g_strcmp0(args[0], "remove") == 0) && field_type == FIELD_JID_MULTI) {
+                    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;
+                    }
+                }
             }
 
             found = autocomplete_param_with_ac(input, size, "/form set", form->tag_ac, TRUE);