From c0910f91762894eec46ba35d9ee67987b36d17af Mon Sep 17 00:00:00 2001 From: kometenstaub <83140328+kometenstaub@users.noreply.github.com> Date: Sun, 3 Jul 2022 21:47:48 +0200 Subject: [PATCH] fix: use better API Support for workspace where only pinned panes are. Closes #34 and possible #33. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 097c78c..f6854c0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -202,7 +202,7 @@ export default class TopBarButtonsPlugin extends Plugin { })); this.registerEvent( this.app.workspace.on('file-open', () => { - const activeLeaf = app.workspace.getLeaf(false); + const activeLeaf = app.workspace.activeLeaf; // if that is used, the buttons don't stay when navigating to a non-markdown pane (excalidraw) //const view =