Added autocomplete for setting room config form tags

This commit is contained in:
James Booth
2014-09-12 13:28:33 +01:00
parent 6c45f8ffae
commit 128a4a811f
3 changed files with 17 additions and 0 deletions

View File

@@ -65,6 +65,7 @@
#include "xmpp/xmpp.h"
#include "xmpp/bookmark.h"
#include "ui/ui.h"
#include "ui/windows.h"
typedef char*(*autocompleter)(char*, int*);
@@ -2078,6 +2079,17 @@ _room_autocomplete(char *input, int *size)
{
char *result = NULL;
ProfWin *current = wins_get_current();
if (current != NULL) {
DataForm *form = current->form;
if (form != NULL) {
result = autocomplete_param_with_ac(input, size, "/room set", form->tag_ac, TRUE);
if (result != NULL) {
return result;
}
}
}
result = autocomplete_param_with_ac(input, size, "/room", room_ac, TRUE);
if (result != NULL) {
return result;