enhance: add first/last buttons for block-nav, no wrapping (#1015) (#1016)

Added 2 new buttons (only visible in block-nav mode), with new icons and new (en_US) strings (First/Last Difference).
Implemented these new buttons, and disabled the automatic wrap-around for the prev/next buttons in block-nav mode.
This commit is contained in:
Göran W 2025-02-24 02:32:19 +01:00 committed by GitHub
parent 9ab602788a
commit fa4caa2186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 127 additions and 3 deletions

View file

@ -11,6 +11,13 @@ namespace SourceGit.Views
InitializeComponent();
}
private void OnGotoFirstChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType<TextDiffView>();
textDiff?.GotoFirstChange();
e.Handled = true;
}
private void OnGotoPrevChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType<TextDiffView>();
@ -24,5 +31,12 @@ namespace SourceGit.Views
textDiff?.GotoNextChange();
e.Handled = true;
}
private void OnGotoLastChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType<TextDiffView>();
textDiff?.GotoLastChange();
e.Handled = true;
}
}
}