diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-06 15:39:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-06 15:39:36 +0000 |
commit | ba4b59d134e5117e53e77c39ac2f458e03e837ad (patch) | |
tree | a8810ce150f43cfcdc0ec25a1ed940b198b3f460 /src/fe-common/core | |
parent | 9f7f4395bf8e1d2374f5efe428bab679b91996d2 (diff) | |
download | irssi-ba4b59d134e5117e53e77c39ac2f458e03e837ad.zip |
When msg list is full, remove old messages, not new messages..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1077 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/chat-completion.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 26757e14..a45623d1 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -87,8 +87,10 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max) rec = g_new(LAST_MSG_REC, 1); rec->nick = g_strdup(nick); - if (g_slist_length(*list) == max) - *list = g_slist_remove(*list, (*list)->data); + if (g_slist_length(*list) == max) { + *list = g_slist_remove(*list, + g_slist_last(*list)->data); + } rec->own = own ? max : 0; } |