Merge pull request #308 from decaf-dev/fix-open-in-new-tab

fix: place new tab at the end of the tab list
This commit is contained in:
DecafDev 2024-08-06 19:50:11 -06:00 committed by GitHub
commit 6d7e2fb553
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
},
});
};