This commit is contained in:
Simon Cambier
2022-07-16 20:06:57 +02:00
parent 817c972233
commit 7ccb531d88
2 changed files with 4 additions and 5 deletions

View File

@@ -106,13 +106,13 @@ async function scrollIntoView(): Promise<void> {
elem?.scrollIntoView({ behavior: "auto", block: "nearest" })
}
async function openSelection(): Promise<void> {
async function openSelection(evt: MouseEvent): Promise<void> {
// TODO: clean me, merge with notes.openNote()
if (note) {
modal.close()
if (parent) parent.close()
await app.workspace.openLinkText(note.path, "")
await app.workspace.openLinkText(note.path, "", evt.ctrlKey)
const view = app.workspace.getActiveViewOfType(MarkdownView)
if (!view) {
throw new Error("OmniSearch - No active MarkdownView")