mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 16:45:53 +02:00
fix(autocomplete): fuzzy search not working if the search one was not enabled
This commit is contained in:
@@ -236,12 +236,6 @@ function findResultsWithExpression(expression: Expression, searchContext: Search
|
||||
loadNeededInfoFromDatabase();
|
||||
}
|
||||
|
||||
// For autocomplete searches, use the dedicated autocomplete fuzzy option
|
||||
// instead of the global fuzzy setting.
|
||||
if (searchContext.autocomplete) {
|
||||
searchContext.enableFuzzyMatching = optionService.getOptionBool("searchAutocompleteFuzzy");
|
||||
}
|
||||
|
||||
// If there's an explicit orderBy clause, skip progressive search
|
||||
// as it would interfere with the ordering
|
||||
if (searchContext.orderBy) {
|
||||
@@ -415,6 +409,12 @@ function findResultsWithQuery(query: string, searchContext: SearchContext): Sear
|
||||
query = query || "";
|
||||
searchContext.originalQuery = query;
|
||||
|
||||
// For autocomplete searches, use the dedicated autocomplete fuzzy option
|
||||
// instead of the global fuzzy setting. Do this early so it applies to all code paths.
|
||||
if (searchContext.autocomplete) {
|
||||
searchContext.enableFuzzyMatching = optionService.getOptionBool("searchAutocompleteFuzzy");
|
||||
}
|
||||
|
||||
const expression = parseQueryToExpression(query, searchContext);
|
||||
|
||||
if (!expression) {
|
||||
|
||||
Reference in New Issue
Block a user