Fix IDE0057
This commit is contained in:
committed by
Pavel Penev
parent
5254348819
commit
023d80b94d
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
prefix = "/";
|
||||
suffix = "";
|
||||
toComplete = text.Substring(1);
|
||||
toComplete = text[1..];
|
||||
candidates = Commands.Where(x => x.StartsWith(toComplete, StringComparison.InvariantCultureIgnoreCase)).ToList();
|
||||
}
|
||||
else if (Names != null)
|
||||
@@ -52,9 +52,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var oneWord = text.Contains(' ');
|
||||
if (oneWord)
|
||||
{
|
||||
prefix = text.Substring(0, text.LastIndexOf(' ') + 1);
|
||||
prefix = text[..(text.LastIndexOf(' ') + 1)];
|
||||
suffix = "";
|
||||
toComplete = text.Substring(prefix.Length);
|
||||
toComplete = text[prefix.Length..];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user