From 96d2913c67bf8348953440954d5e41986c6b121b Mon Sep 17 00:00:00 2001 From: Vinzent Date: Sat, 16 Jul 2022 21:52:47 +0200 Subject: [PATCH] fix: open diff view in correct pane close #252 --- src/ui/sidebar/components/fileComponent.svelte | 2 +- .../components/stagedFileComponent.svelte | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ui/sidebar/components/fileComponent.svelte b/src/ui/sidebar/components/fileComponent.svelte index 8734e973..07c2e4a0 100644 --- a/src/ui/sidebar/components/fileComponent.svelte +++ b/src/ui/sidebar/components/fileComponent.svelte @@ -51,7 +51,7 @@ } function showDiff(event: MouseEvent) { - const leaf = workspace.activeLeaf; + const leaf = workspace.getMostRecentLeaf(workspace.rootSplit); if ( leaf && diff --git a/src/ui/sidebar/components/stagedFileComponent.svelte b/src/ui/sidebar/components/stagedFileComponent.svelte index a9350d0d..5a19ed2a 100644 --- a/src/ui/sidebar/components/stagedFileComponent.svelte +++ b/src/ui/sidebar/components/stagedFileComponent.svelte @@ -1,7 +1,7 @@