mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Added autocomplete for /field list-single types
This commit is contained in:
parent
5818fbe7bb
commit
f1097daaa3
@ -2295,6 +2295,7 @@ _form_autocomplete(char *input, int *size)
|
|||||||
char *field_tag = split[0]+1;
|
char *field_tag = split[0]+1;
|
||||||
if (form_tag_exists(form, field_tag)) {
|
if (form_tag_exists(form, field_tag)) {
|
||||||
form_field_type_t field_type = form_get_field_type(form, field_tag);
|
form_field_type_t field_type = form_get_field_type(form, field_tag);
|
||||||
|
Autocomplete ac = NULL;
|
||||||
|
|
||||||
switch (field_type)
|
switch (field_type)
|
||||||
{
|
{
|
||||||
@ -2302,16 +2303,19 @@ _form_autocomplete(char *input, int *size)
|
|||||||
found = autocomplete_param_with_func(input, size, split[0],
|
found = autocomplete_param_with_func(input, size, split[0],
|
||||||
prefs_autocomplete_boolean_choice);
|
prefs_autocomplete_boolean_choice);
|
||||||
break;
|
break;
|
||||||
|
case FIELD_LIST_SINGLE:
|
||||||
|
ac = form_get_value_ac(form, field_tag);
|
||||||
|
found = autocomplete_param_with_ac(input, size, split[0], ac, TRUE);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_strfreev(split);
|
||||||
if (found) {
|
if (found) {
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
found = autocomplete_param_with_ac(input, size, "/form", form_ac, TRUE);
|
found = autocomplete_param_with_ac(input, size, "/form", form_ac, TRUE);
|
||||||
if (found != NULL) {
|
if (found != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user