소스 검색

Fixed not being able to search with whitespaces

CPKreuz 2 년 전
부모
커밋
b4030b0310
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/PixiEditor/Views/UserControls/CommandSearch/CommandSearchControlHelper.cs

+ 1 - 1
src/PixiEditor/Views/UserControls/CommandSearch/CommandSearchControlHelper.cs

@@ -48,7 +48,7 @@ internal static class CommandSearchControlHelper
         // add matching commands
         newResults.AddRange(
             controller.Commands
-                .Where(x => x.Description.Replace(" ", "").Contains(query, StringComparison.OrdinalIgnoreCase))
+                .Where(x => x.Description.Replace(" ", "").Contains(query.Replace(" ", ""), StringComparison.OrdinalIgnoreCase))
                 .Where(static x => ViewModelMain.Current.DebugSubViewModel.UseDebug ? true : !x.IsDebug)
                 .OrderByDescending(x => x.Description.Contains($" {query} ", StringComparison.OrdinalIgnoreCase))
                 .Take(18)