mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 09:35:00 +00:00
refactor: text diff view block navigation
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
39f4cd1732
commit
03f49ccff0
3 changed files with 77 additions and 86 deletions
|
@ -13,30 +13,32 @@ namespace SourceGit.Views
|
|||
|
||||
private void OnGotoFirstChange(object _, RoutedEventArgs e)
|
||||
{
|
||||
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
||||
textDiff?.GotoFirstChange();
|
||||
this.FindDescendantOfType<TextDiffView>()?.GotoFirstChange();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnGotoPrevChange(object _, RoutedEventArgs e)
|
||||
{
|
||||
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
||||
textDiff?.GotoPrevChange();
|
||||
this.FindDescendantOfType<TextDiffView>()?.GotoPrevChange();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnGotoNextChange(object _, RoutedEventArgs e)
|
||||
{
|
||||
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
||||
textDiff?.GotoNextChange();
|
||||
this.FindDescendantOfType<TextDiffView>()?.GotoNextChange();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnGotoLastChange(object _, RoutedEventArgs e)
|
||||
{
|
||||
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
||||
textDiff?.GotoLastChange();
|
||||
this.FindDescendantOfType<TextDiffView>()?.GotoLastChange();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnBlockNavigationChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is TextDiffView { UseBlockNavigation: true } textDiff)
|
||||
BlockNavigationIndicator.Text = textDiff.BlockNavigation?.Indicator ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue