mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
copied fuse options from completions fuse
This commit is contained in:
parent
0fda7cd274
commit
729f064855
|
|
@ -55,7 +55,13 @@ async function fuseBookmarksSearch(query: string): Promise<Bookmark[]> {
|
|||
allBookmarks = allBookmarks || (await collectBookmarks())
|
||||
bookmarksFuse =
|
||||
bookmarksFuse ||
|
||||
new Fuse(allBookmarks, { keys: ["path", "title", "url"] })
|
||||
new Fuse(allBookmarks, {
|
||||
keys: ["path", "title", "url"],
|
||||
findAllMatches: true,
|
||||
ignoreLocation: true,
|
||||
ignoreFieldNorm: true,
|
||||
threshold: config.get("completionfuzziness"),
|
||||
})
|
||||
return query ? bookmarksFuse.search(query).map(r => r.item) : allBookmarks
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue