Skip to content

Commit

Permalink
Check recent nicks against nick list when tab completing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lesderid authored and pulkomandy committed Dec 17, 2020
1 parent 7be5b37 commit 80260e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ChannelAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))) {
Expand Down

0 comments on commit 80260e6

Please sign in to comment.