diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-09-20 17:33:37 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-09-20 17:34:01 +0200 |
commit | 8a689c98b4cd1f5f2b5f0b45fb7b8e3bb4f932c8 (patch) | |
tree | 0a7b2c8640a831e092f4226e24f91a1ea5297f54 /xC.c | |
parent | 9327333813cbcb538f6757934be42d59c34f86d6 (diff) | |
download | xK-8a689c98b4cd1f5f2b5f0b45fb7b8e3bb4f932c8.tar.gz xK-8a689c98b4cd1f5f2b5f0b45fb7b8e3bb4f932c8.tar.xz xK-8a689c98b4cd1f5f2b5f0b45fb7b8e3bb4f932c8.zip |
xC: fix autocomplete in server buffers
Diffstat (limited to 'xC.c')
-rw-r--r-- | xC.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |