Skip to content

Commit 183f073

Browse files
committed
Feature: Use active pane’s path when splitting
1 parent 6cbbeb8 commit 183f073

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace Files.App.Actions
66
internal sealed partial class SplitPaneHorizontallyAction : ObservableObject, IAction
77
{
88
private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();
9-
private readonly IGeneralSettingsService GeneralSettingsService = Ioc.Default.GetRequiredService<IGeneralSettingsService>();
109

1110
public string Label
1211
=> Strings.SplitPaneHorizontally.GetLocalizedResource();
@@ -31,7 +30,7 @@ public SplitPaneHorizontallyAction()
3130

3231
public Task ExecuteAsync(object? parameter = null)
3332
{
34-
ContentPageContext.ShellPage!.PaneHolder.OpenSecondaryPane(arrangement: ShellPaneArrangement.Horizontal);
33+
ContentPageContext.ShellPage!.PaneHolder.OpenSecondaryPane(ContentPageContext.ShellPage!.ShellViewModel.WorkingDirectory, ShellPaneArrangement.Horizontal);
3534

3635
return Task.CompletedTask;
3736
}

src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace Files.App.Actions
66
internal sealed partial class SplitPaneVerticallyAction : ObservableObject, IAction
77
{
88
private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();
9-
private readonly IGeneralSettingsService GeneralSettingsService = Ioc.Default.GetRequiredService<IGeneralSettingsService>();
109

1110
public string Label
1211
=> Strings.SplitPaneVertically.GetLocalizedResource();
@@ -31,7 +30,7 @@ public SplitPaneVerticallyAction()
3130

3231
public Task ExecuteAsync(object? parameter = null)
3332
{
34-
ContentPageContext.ShellPage!.PaneHolder.OpenSecondaryPane(arrangement: ShellPaneArrangement.Vertical);
33+
ContentPageContext.ShellPage!.PaneHolder.OpenSecondaryPane(ContentPageContext.ShellPage!.ShellViewModel.WorkingDirectory, ShellPaneArrangement.Vertical);
3534

3635
return Task.CompletedTask;
3736
}

src/Files.App/Actions/Show/ToggleDualPaneAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public Task ExecuteAsync(object? parameter = null)
2727
if (IsOn)
2828
ContentPageContext.ShellPage?.PaneHolder.CloseOtherPane();
2929
else
30-
ContentPageContext.ShellPage?.PaneHolder.OpenSecondaryPane(arrangement: generalSettingsService.ShellPaneArrangementOption);
30+
ContentPageContext.ShellPage?.PaneHolder.OpenSecondaryPane(ContentPageContext.ShellPage!.ShellViewModel.WorkingDirectory, generalSettingsService.ShellPaneArrangementOption);
3131

3232
return Task.CompletedTask;
3333
}

0 commit comments

Comments
 (0)