From e2562ad6b3a8119774db2a9015499ba6f0c82789 Mon Sep 17 00:00:00 2001 From: DecafDev <40307803+decaf-dev@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:49:36 -0600 Subject: [PATCH] fix: place new tab at the end of the tab list --- src/svelte/app/services/context-menu.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/svelte/app/services/context-menu.ts b/src/svelte/app/services/context-menu.ts index 64b3031..ee5d2a7 100644 --- a/src/svelte/app/services/context-menu.ts +++ b/src/svelte/app/services/context-menu.ts @@ -47,8 +47,12 @@ const openToTheRight = (plugin: VaultExplorerPlugin, filePath: string) => { }; const openInNewTab = (plugin: VaultExplorerPlugin, filePath: string) => { - plugin.app.workspace.openLinkText("", filePath, "tab", { + plugin.app.workspace.getLeaf().setViewState({ + type: "markdown", active: false, + state: { + file: filePath, + }, }); };