mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
nick completion: don't add the same nick to completion list twice.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1515 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
47f272da98
commit
3e825325b8
@ -393,7 +393,11 @@ static GList *completion_nicks_nonstrict(CHANNEL_REC *channel,
|
||||
tnick = g_strconcat(rec->nick, suffix, NULL);
|
||||
if (completion_lowercase)
|
||||
g_strdown(tnick);
|
||||
list = g_list_append(list, tnick);
|
||||
|
||||
if (glist_find_icase_string(list, tnick) == NULL)
|
||||
list = g_list_append(list, tnick);
|
||||
else
|
||||
g_free(tnick);
|
||||
}
|
||||
|
||||
}
|
||||
@ -429,11 +433,14 @@ static GList *completion_channel_nicks(CHANNEL_REC *channel, const char *nick,
|
||||
NICK_REC *rec = tmp->data;
|
||||
|
||||
if (g_strncasecmp(rec->nick, nick, len) == 0 &&
|
||||
glist_find_icase_string(list, rec->nick) == NULL &&
|
||||
rec != channel->ownnick) {
|
||||
str = g_strconcat(rec->nick, suffix, NULL);
|
||||
if (completion_lowercase) g_strdown(str);
|
||||
list = g_list_append(list, str);
|
||||
if (completion_lowercase)
|
||||
g_strdown(str);
|
||||
if (glist_find_icase_string(list, str) == NULL)
|
||||
list = g_list_append(list, str);
|
||||
else
|
||||
g_free(str);
|
||||
}
|
||||
}
|
||||
g_slist_free(nicks);
|
||||
|
Loading…
Reference in New Issue
Block a user