Console: completion use Contains instead of StartWith

This commit is contained in:
Arnaud Jamin
2025-02-09 17:03:24 -05:00
parent d5c6896766
commit 357bd9974e
@@ -590,7 +590,7 @@ void FCogEngineWindow_Console::RefreshCommandList()
if (Command.IsEmpty())
{ continue; }
if (CurrentUserInput.IsEmpty() == false && Command.StartsWith(CurrentUserInput) == false)
if (CurrentUserInput.IsEmpty() == false && Command.Contains(CurrentUserInput) == false)
{ continue; }
if (CommandList.Num() >= Config->NumHistoryCommands)
@@ -611,7 +611,7 @@ void FCogEngineWindow_Console::RefreshCommandList()
Commands.Add(InName);
};
IConsoleManager::Get().ForEachConsoleObjectThatStartsWith(FConsoleObjectVisitor::CreateLambda(OnConsoleObject), *CurrentUserInputWithoutArgs);
IConsoleManager::Get().ForEachConsoleObjectThatContains(FConsoleObjectVisitor::CreateLambda(OnConsoleObject), *CurrentUserInputWithoutArgs);
}
if (Config->SortCommands)