From 634bc9bf6ab0d9395d728679062705bbdcb2e73a Mon Sep 17 00:00:00 2001 From: Xu Quan Date: Tue, 25 Feb 2025 10:54:12 +0800 Subject: [PATCH] fix: when click 'open in new tab', open file in new tab instead of in previous tab --- src/components/File.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/File.tsx b/src/components/File.tsx index 3643cae..f37d725 100644 --- a/src/components/File.tsx +++ b/src/components/File.tsx @@ -121,6 +121,7 @@ const File = ({ file, useFileTreeStore, plugin, deleteFile }: Props) => { menu.addItem((item) => { item.setTitle("Open in new tab"); item.onClick(() => { + plugin.app.workspace.openLinkText(file.path, file.path, true); selectFile(file); }); });