From 71f73fd62cff4cfdcaec95e06febe183a59238dd Mon Sep 17 00:00:00 2001 From: Lukas Petry Date: Thu, 31 Aug 2023 21:29:40 +0200 Subject: [PATCH] :necktie: Allow sidebar notes to link to themselves in the main space --- main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 2d0715b..475bd01 100644 --- a/main.ts +++ b/main.ts @@ -206,7 +206,7 @@ export default class Opener extends Plugin { } // same file - if (file.path == app.workspace.getActiveFile()?.path) { + if (file.path == app.workspace.getActiveFile()?.path && openState?.eState?.subpath) { // clicking on link with same path as active file in view (ie headings, blocks, etc). file.path is thing being opened. app.workspace.getActiveFile()?.path is currently opened tab filepath. return defaultBehavior(); }