mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix tabbing usernames with @
This commit is contained in:
parent
eb230494a6
commit
92bf1adf88
|
@ -100,10 +100,20 @@ void CompletionModel::refresh(const QString &prefix)
|
|||
if (prefix.length() >= UsernameSet::PrefixLength) {
|
||||
auto usernames = channel->accessChatters();
|
||||
|
||||
for (const auto &name : usernames->subrange(Prefix(prefix))) {
|
||||
addString(name, TaggedString::Type::Username);
|
||||
QString usernamePrefix = prefix;
|
||||
|
||||
if (usernamePrefix.startsWith("@")) {
|
||||
usernamePrefix.remove(0, 1);
|
||||
for (const auto &name :
|
||||
usernames->subrange(Prefix(usernamePrefix))) {
|
||||
addString("@" + name, TaggedString::Type::Username);
|
||||
}
|
||||
} else {
|
||||
for (const auto &name :
|
||||
usernames->subrange(Prefix(usernamePrefix))) {
|
||||
addString(name, TaggedString::Type::Username);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bttv Global
|
||||
|
|
Loading…
Reference in a new issue