Fix Slash Commands in the Middle of a Message

Make sure that a slash command only activates when the slash is at the beginning of the message.

BUG: 457474
This commit is contained in:
James Graham
2022-09-22 15:11:56 +00:00
committed by Tobias Fella
parent d2ed1cfb2e
commit 53b9f42399

View File

@@ -159,7 +159,7 @@ QVariantMap ChatDocumentHandler::getAutocompletionInfo(bool isAutocompleting)
};
}
if (autoCompletePrefix.startsWith("/")) {
if (autoCompletePrefix.startsWith("/") && text.trimmed().length() <= 1) {
return QVariantMap{
{"keyword", autoCompletePrefix},
{"type", AutoCompletionType::Command},