meebey/smuxi — pull request #48 by RavuAlHemio (2013-04-30 14:09:20+00:00)
Title: [Frontend] fix erroneous completion across chats

I found a bug in the tab-completion code I wrote.

When using tab-cycle nick completion mode, successfully triggering completion,
then switching to a different chat, then triggering completion again would
supply a nickname from the previous chat.

Now, if the user switches to a different chat, the completer forgets the
previous nickname list (and refuses to cycle through the completions until a
completion with different input is triggered).

An example of the bug: I am in `#athens` with the participants `Hippolyta`, `Hermia` and `Helena`. I type `H` and press Tab; the nickname is completed to `Helena: `. I switch to another chat, `#elsinore`, with the participants `Hamlet` and `HamletSr|Ghost`. Before the bugfix, pressing Tab again would complete `Hermia: `, although that participant is in `#athens` and I'm looking at `#elsinore`. After the bugfix, no tab completion is performed and `Helena: ` remains unchanged.