feature<TextDiffView>: do NOT reset scroll offset after recompute diff with same change

This commit is contained in:
leo 2024-02-29 11:29:54 +08:00
parent 096fd6cb22
commit 2b97d7c599
5 changed files with 38 additions and 12 deletions

View file

@ -1,4 +1,5 @@
using Avalonia.Threading;
using Avalonia;
using Avalonia.Threading;
using CommunityToolkit.Mvvm.ComponentModel;
using System.IO;
using System.Threading.Tasks;
@ -49,6 +50,11 @@ namespace SourceGit.ViewModels {
private set => SetProperty(ref _content, value);
}
public Vector SyncScrollOffset {
get => _syncScrollOffset;
set => SetProperty(ref _syncScrollOffset, value);
}
public DiffContext(string repo, Models.DiffOption option) {
_repo = repo;
_option = option;
@ -113,5 +119,6 @@ namespace SourceGit.ViewModels {
private bool _isNoChange = false;
private bool _isTextDiff = false;
private object _content = null;
private Vector _syncScrollOffset = Vector.Zero;
}
}