diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index 231a498856..8e94ed5a1d 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var disableTeamChat = alwaysDisabled || (world.LocalPlayer != null && !players.Any(p => p.IsAlliedWith(world.LocalPlayer))); var teamChat = !disableTeamChat; - tabCompletion.Commands = chatTraits.OfType().SelectMany(x => x.Commands.Keys).ToList(); + tabCompletion.Commands = chatTraits.OfType().ToArray().SelectMany(x => x.Commands.Keys); tabCompletion.Names = orderManager.LobbyInfo.Clients.Select(c => c.Name).Distinct().ToList(); if (logicArgs.TryGetValue("Templates", out var templateIds)) diff --git a/OpenRA.Mods.Common/Widgets/Logic/TabCompletionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/TabCompletionLogic.cs index 25340f9123..41505338d0 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/TabCompletionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/TabCompletionLogic.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic string prefix; string suffix; - public IList Commands { get; set; } + public IEnumerable Commands { get; set; } public IList Names { get; set; }