mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
enhance: supports word wrap in text diff view
This commit is contained in:
parent
d2ea90be23
commit
802b429cc8
10 changed files with 37 additions and 30 deletions
|
@ -58,12 +58,6 @@ namespace SourceGit.ViewModels
|
|||
private set => SetProperty(ref _content, value);
|
||||
}
|
||||
|
||||
public Vector SyncScrollOffset
|
||||
{
|
||||
get => _syncScrollOffset;
|
||||
set => SetProperty(ref _syncScrollOffset, value);
|
||||
}
|
||||
|
||||
public int Unified
|
||||
{
|
||||
get => _unified;
|
||||
|
@ -203,6 +197,9 @@ namespace SourceGit.ViewModels
|
|||
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
if (_content is Models.TextDiff old && rs is Models.TextDiff cur && old.File == cur.File)
|
||||
cur.SyncScrollOffset = old.SyncScrollOffset;
|
||||
|
||||
FileModeChange = latest.FileModeChange;
|
||||
Content = rs;
|
||||
IsTextDiff = rs is Models.TextDiff;
|
||||
|
@ -229,7 +226,6 @@ namespace SourceGit.ViewModels
|
|||
private bool _isLoading = true;
|
||||
private bool _isTextDiff = false;
|
||||
private object _content = null;
|
||||
private Vector _syncScrollOffset = Vector.Zero;
|
||||
private int _unified = 4;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue