Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Views/CommitChanges.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
EnableCompactFolders="{Binding Source={x:Static vm:Preferences.Instance}, Path=EnableCompactFoldersInChangesTree}"
Changes="{Binding VisibleChanges, Mode=OneWay}"
Selection="{Binding ChangeSelection, Mode=TwoWay}"
ChangeDoubleTapped="OnChangeDoubleTapped"
ContextRequested="OnChangeContextRequested"
KeyDown="OnChangeCollectionViewKeyDown"/>
</Border>
Expand Down
11 changes: 11 additions & 0 deletions src/Views/CommitChanges.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
using Avalonia.VisualTree;

Expand All @@ -16,6 +17,16 @@ public CommitChanges()
InitializeComponent();
}

private void OnChangeDoubleTapped(object sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail vm &&
sender is ChangeCollectionView { Selection: { Count: 1, HasFolder: false } selection })
{
vm.OpenChangeInMergeTool(selection.Changes[0]);
e.Handled = true;
}
}

private void OnChangeContextRequested(object sender, ContextRequestedEventArgs e)
{
e.Handled = true;
Expand Down