Fixed the InFile's searchQuery that was overwritten by an empty lastSearch
This commit is contained in:
@@ -28,7 +28,9 @@ let selectedIndex = 0
|
|||||||
let note: ResultNote | null = null
|
let note: ResultNote | null = null
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
if (lastSearch && !searchQuery) {
|
||||||
searchQuery = lastSearch
|
searchQuery = lastSearch
|
||||||
|
}
|
||||||
eventBus.disable("vault")
|
eventBus.disable("vault")
|
||||||
|
|
||||||
eventBus.on("infile", "enter", openSelection)
|
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[][] {
|
function getGroups(matches: SearchMatch[]): SearchMatch[][] {
|
||||||
const groups: SearchMatch[][] = []
|
const groups: SearchMatch[][] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user