mirror of
https://github.com/decaf-dev/obsidian-vault-explorer.git
synced 2026-07-22 10:10:31 +00:00
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:
commit
6d7e2fb553
1 changed files with 5 additions and 1 deletions
|
|
@ -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,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue