From a19ec991b00ba43da84cfa79fd4812f3544ea76b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 12 Dec 2022 00:02:26 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/6856 --- app/src/search/spread.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/search/spread.ts b/app/src/search/spread.ts index 8bb3fe881..9f4e07987 100644 --- a/app/src/search/spread.ts +++ b/app/src/search/spread.ts @@ -61,8 +61,8 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri paragraph: window.siyuan.config.search.paragraph, }; } - let hPath = ""; - const idPath: string[] = []; + let hPath = localData; + let idPath: string[] = []; if (notebookId) { hPath = escapeHtml(getNotebookName(notebookId)); idPath.push(notebookId); @@ -74,6 +74,9 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri hPath = pathPosix().join(hPath, escapeHtml(response.data)); idPath[0] = pathPosix().join(idPath[0], searchPath); } + } else if (window.siyuan.config.keymap.general.globalSearch.custom === hotkey) { + hPath = localData.hPath || ""; + idPath = localData.idPath || []; } let range: Range;