diff options
author | James Booth <boothj5@gmail.com> | 2016-05-24 01:44:56 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-05-24 01:44:56 +0100 |
commit | 8699510408030201fb3ea432a63441ad73e65324 (patch) | |
tree | 7af5f597ae056f0bf81c07fa2e76a5a2235d07df /src/command/cmd_ac.c | |
parent | e8b25780399dda78a3f5ee0dfa94017316c9d7e6 (diff) | |
download | profani-tty-8699510408030201fb3ea432a63441ad73e65324.tar.gz |
Complete no arg for /role set
Diffstat (limited to 'src/command/cmd_ac.c')
-rw-r--r-- | src/command/cmd_ac.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 8b902c34..6db2995f 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -2318,13 +2318,15 @@ _role_autocomplete(ProfWin *window, const char *const input) gboolean parse_result; Autocomplete nick_ac = muc_roster_ac(mucwin->roomjid); - gchar **args = parse_args(input, 3, 3, &parse_result); + gchar **args = parse_args(input, 2, 3, &parse_result); if ((strncmp(input, "/role", 5) == 0) && (parse_result == TRUE)) { GString *beginning = g_string_new("/role "); g_string_append(beginning, args[0]); g_string_append(beginning, " "); - g_string_append(beginning, args[1]); + if (args[1]) { + g_string_append(beginning, args[1]); + } result = autocomplete_param_with_ac(input, beginning->str, nick_ac, TRUE); g_string_free(beginning, TRUE); |