From 80260e64e84e0a33d7ae0e487245a23c077767b9 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Sun, 26 Jan 2020 12:57:32 +0100 Subject: [PATCH] Check recent nicks against nick list when tab completing Nicks weren't checked against the nick list when tab completing, causing nicks that have PARTed to be completed when using bouncer playback from which PARTs are absent. Untested because no Haiku build environment set up at the moment. --- src/ChannelAgent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChannelAgent.cpp b/src/ChannelAgent.cpp index ca5c7fe..7e0b34c 100644 --- a/src/ChannelAgent.cpp +++ b/src/ChannelAgent.cpp @@ -366,7 +366,8 @@ void ChannelAgent::TabExpansion() // list in the correct order for (i = 0; i < count; i++) { BString* name(new BString(*fRecentNicks.ItemAt(i))); - if (!(name->ICompare(fLastExpansion.String(), strlen(fLastExpansion.String())))) { + if (!(name->ICompare(fLastExpansion.String(), strlen(fLastExpansion.String()))) && + FindPosition(name.String()) > 0) { // parse through list and nuke duplicate if present for (int32 j = fCompletionNicks.CountItems() - 1; j >= 0; j--) { if (!(name->ICompare(*fCompletionNicks.ItemAt(j)))) {