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()) if (Command.IsEmpty())
{ continue; } { continue; }
if (CurrentUserInput.IsEmpty() == false && Command.StartsWith(CurrentUserInput) == false) if (CurrentUserInput.IsEmpty() == false && Command.Contains(CurrentUserInput) == false)
{ continue; } { continue; }
if (CommandList.Num() >= Config->NumHistoryCommands) if (CommandList.Num() >= Config->NumHistoryCommands)
@@ -611,7 +611,7 @@ void FCogEngineWindow_Console::RefreshCommandList()
Commands.Add(InName); Commands.Add(InName);
}; };
IConsoleManager::Get().ForEachConsoleObjectThatStartsWith(FConsoleObjectVisitor::CreateLambda(OnConsoleObject), *CurrentUserInputWithoutArgs); IConsoleManager::Get().ForEachConsoleObjectThatContains(FConsoleObjectVisitor::CreateLambda(OnConsoleObject), *CurrentUserInputWithoutArgs);
} }
if (Config->SortCommands) if (Config->SortCommands)