Fixed the InFile's searchQuery that was overwritten by an empty lastSearch

This commit is contained in:
Simon Cambier
2022-04-26 21:51:10 +02:00
parent fc9c677d42
commit 664d2ef30b

View File

@@ -28,7 +28,9 @@ let selectedIndex = 0
let note: ResultNote | null = null
onMount(() => {
if (lastSearch && !searchQuery) {
searchQuery = lastSearch
}
eventBus.disable("vault")
eventBus.on("infile", "enter", openSelection)
@@ -61,7 +63,7 @@ $: {
}
/**
* Group together close
* Group together close matches to reduce the number of results
*/
function getGroups(matches: SearchMatch[]): SearchMatch[][] {
const groups: SearchMatch[][] = []