diff options
author | James Booth <boothj5@gmail.com> | 2017-04-01 00:27:11 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2017-04-01 00:27:11 +0100 |
commit | 6b830277a6e2f90c7f8fde94ccf31dc6a4e4e73e (patch) | |
tree | 4b99ba6b6d48c51bce6dfa6f8dbb30e1f4501832 /src/xmpp/muc.c | |
parent | 1b9d033cef78365ca73ac504041ce129fdf334d2 (diff) | |
download | profani-tty-6b830277a6e2f90c7f8fde94ccf31dc6a4e4e73e.tar.gz |
Allow previous autocompletion with shift tab
Diffstat (limited to 'src/xmpp/muc.c')
-rw-r--r-- | src/xmpp/muc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/xmpp/muc.c b/src/xmpp/muc.c index 7e926593..69cacba1 100644 --- a/src/xmpp/muc.c +++ b/src/xmpp/muc.c @@ -120,7 +120,7 @@ muc_invites_count(void) return autocomplete_length(invite_ac); } -GSList* +GList* muc_invites(void) { return autocomplete_create_list(invite_ac); @@ -135,17 +135,17 @@ muc_invite_password(const char *const room) gboolean muc_invites_contain(const char *const room) { - GSList *invites = autocomplete_create_list(invite_ac); - GSList *curr = invites; + GList *invites = autocomplete_create_list(invite_ac); + GList *curr = invites; while (curr) { if (strcmp(curr->data, room) == 0) { - g_slist_free_full(invites, g_free); + g_list_free_full(invites, g_free); return TRUE; } else { - curr = g_slist_next(curr); + curr = g_list_next(curr); } } - g_slist_free_full(invites, g_free); + g_list_free_full(invites, g_free); return FALSE; } @@ -157,9 +157,9 @@ muc_invites_reset_ac(void) } char* -muc_invites_find(const char *const search_str) +muc_invites_find(const char *const search_str, gboolean previous) { - return autocomplete_complete(invite_ac, search_str, TRUE); + return autocomplete_complete(invite_ac, search_str, TRUE, previous); } void @@ -663,7 +663,7 @@ muc_roster_nick_change_complete(const char *const room, const char *const nick) } char* -muc_autocomplete(ProfWin *window, const char *const input) +muc_autocomplete(ProfWin *window, const char *const input, gboolean previous) { if (window->type == WIN_MUC) { ProfMucWin *mucwin = (ProfMucWin*)window; @@ -686,7 +686,7 @@ muc_autocomplete(ProfWin *window, const char *const input) } } - char *result = autocomplete_complete(chat_room->nick_ac, search_str, FALSE); + char *result = autocomplete_complete(chat_room->nick_ac, search_str, FALSE, previous); if (result) { GString *replace_with = g_string_new(chat_room->autocomplete_prefix); g_string_append(replace_with, result); |