mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
merge one extra condition to the switch case
This commit is contained in:
parent
ab9e6a8143
commit
b07490271d
1 changed files with 7 additions and 1 deletions
|
|
@ -76,10 +76,16 @@ namespace Flow.Launcher.Infrastructure
|
|||
if (currentQueryIndex >= queryWithoutCase.Length)
|
||||
break;
|
||||
|
||||
if (compareIndex == 0 && queryWithoutCase[currentQueryIndex] == char.ToLower(stringToCompare[compareIndex]))
|
||||
{
|
||||
acronymMatchData.Add(compareIndex);
|
||||
currentQueryIndex++;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (stringToCompare[compareIndex])
|
||||
{
|
||||
case char c when (compareIndex == 0 && queryWithoutCase[currentQueryIndex] == char.ToLower(stringToCompare[compareIndex]))
|
||||
case char c when compareIndex == 0 && queryWithoutCase[currentQueryIndex] == char.ToLower(stringToCompare[compareIndex])
|
||||
|| (char.IsUpper(c) && char.ToLower(c) == queryWithoutCase[currentQueryIndex])
|
||||
|| (char.IsWhiteSpace(c) && char.ToLower(stringToCompare[++compareIndex]) == queryWithoutCase[currentQueryIndex]):
|
||||
acronymMatchData.Add(compareIndex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue