optimize: only set Offset from SyncScrollOffset while it's not focused.

This commit is contained in:
leo 2024-04-28 16:50:06 +08:00
parent d9911b3447
commit 5d1de37308

View file

@ -755,7 +755,7 @@ namespace SourceGit.Views
} }
else if (change.Property == SyncScrollOffsetProperty) else if (change.Property == SyncScrollOffsetProperty)
{ {
if (_scrollViewer != null) if (!TextArea.IsFocused && _scrollViewer != null)
_scrollViewer.Offset = SyncScrollOffset; _scrollViewer.Offset = SyncScrollOffset;
} }
else if (change.Property == UseSyntaxHighlightingProperty) else if (change.Property == UseSyntaxHighlightingProperty)