xC: fix autocomplete in server buffers
This commit is contained in:
parent
9327333813
commit
8a689c98b4
5
xC.c
5
xC.c
|
@ -13581,16 +13581,17 @@ static void
|
|||
complete_nicknames (struct buffer *buffer, struct completion *data,
|
||||
const char *word, struct strv *output)
|
||||
{
|
||||
size_t word_len = strlen (word);
|
||||
if (buffer->type == BUFFER_SERVER)
|
||||
{
|
||||
struct user *self_user = buffer->server->irc_user;
|
||||
if (self_user)
|
||||
if (self_user && !irc_server_strncmp (buffer->server,
|
||||
word, self_user->nickname, word_len))
|
||||
strv_append (output, self_user->nickname);
|
||||
}
|
||||
if (buffer->type != BUFFER_CHANNEL)
|
||||
return;
|
||||
|
||||
size_t word_len = strlen (word);
|
||||
LIST_FOR_EACH (struct channel_user, iter, buffer->channel->users)
|
||||
{
|
||||
const char *nickname = iter->user->nickname;
|
||||
|
|
Loading…
Reference in New Issue