From b67ab7747eaaa91086dea117465c4265fa5dacc7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 4 Dec 2000 02:45:34 +0000 Subject: [PATCH] In queries the queried nick was always added to completion list even if the word to be completed didn't start with the same characters git-svn-id: http://svn.irssi.org/repos/irssi/trunk@952 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/chat-completion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 99827f58..a29c1cc8 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -484,7 +484,8 @@ static void sig_complete_word(GList **list, WINDOW_REC *window, channel = CHANNEL(window->active); query = QUERY(window->active); - if (channel == NULL && query != NULL) { + if (channel == NULL && query != NULL && + g_strncasecmp(word, query->name, strlen(word)) == 0) { /* completion in query */ *list = g_list_append(*list, g_strdup(query->name)); } else if (channel != NULL) {