feature<DiffViewer>: 定位差异(Previous & Next)时现在会高亮当前位置

This commit is contained in:
ZCShou 2021-05-25 13:53:29 +08:00
parent cc661d3226
commit 60584669f6

View file

@ -636,6 +636,7 @@ namespace SourceGit.Views.Widgets {
if (next.IsDifference) { if (next.IsDifference) {
if (firstModeEnded || next.Mode != first.Mode) { if (firstModeEnded || next.Mode != first.Mode) {
scroller.ScrollToVerticalOffset(i); scroller.ScrollToVerticalOffset(i);
grid.SelectedIndex = i;
break; break;
} }
} else { } else {
@ -659,6 +660,7 @@ namespace SourceGit.Views.Widgets {
if (next.IsDifference) { if (next.IsDifference) {
if (firstModeEnded || next.Mode != first.Mode) { if (firstModeEnded || next.Mode != first.Mode) {
scroller.ScrollToVerticalOffset(i); scroller.ScrollToVerticalOffset(i);
grid.SelectedIndex = i;
break; break;
} }
} else { } else {