fix: Commands now completable when not starting with / (#4846)

* Add commands to completable inputs when no prefix
This commit is contained in:
Daniel Sage
2023-09-30 07:06:16 -04:00
committed by GitHub
parent bdd7d95092
commit 4d8b62364d
8 changed files with 123 additions and 84 deletions
@@ -14,11 +14,17 @@ namespace {
{
if (command.startsWith('/') || command.startsWith('.'))
{
out.push_back({command.mid(1), command.at(0)});
out.push_back({
.name = command.mid(1),
.prefix = command.at(0),
});
}
else
{
out.push_back({command, '/'});
out.push_back({
.name = command,
.prefix = "",
});
}
}