Skip to content

Commit

Permalink
Use EverythingSearchOption flag to set up FullPathSearch instead …
Browse files Browse the repository at this point in the history
…of hardcoding it
  • Loading branch information
TheBestPessimist committed Jan 26, 2023
1 parent 2b6c92c commit 1b9a879
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static async IAsyncEnumerable<SearchResult> SearchAsync(EverythingSearchO
EverythingApiDllImport.Everything_SetMax(option.MaxCount);

EverythingApiDllImport.Everything_SetSort(option.SortOption);
EverythingApiDllImport.Everything_SetMatchPath(true);
EverythingApiDllImport.Everything_SetMatchPath(option.IsFullPathSearch);

if (token.IsCancellationRequested) yield break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

namespace Flow.Launcher.Plugin.Explorer.Search.Everything
{
public record struct EverythingSearchOption(string Keyword,
public record struct EverythingSearchOption(
string Keyword,
SortOption SortOption,
bool IsContentSearch = false,
bool IsContentSearch = false,
string ContentSearchKeyword = default,
string ParentPath = default,
bool IsRecursive = true,
int Offset = 0,
int MaxCount = 100);
int Offset = 0,
int MaxCount = 100,
bool IsFullPathSearch = true
);
}

0 comments on commit 1b9a879

Please sign in to comment.