From 5d1de3730800bfb50a6301f92eaf615e3b033d7c Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 28 Apr 2024 16:50:06 +0800 Subject: [PATCH] optimize: only set Offset from SyncScrollOffset while it's not focused. --- src/Views/TextDiffView.axaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index 9672110e..3969c1b7 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -755,7 +755,7 @@ namespace SourceGit.Views } else if (change.Property == SyncScrollOffsetProperty) { - if (_scrollViewer != null) + if (!TextArea.IsFocused && _scrollViewer != null) _scrollViewer.Offset = SyncScrollOffset; } else if (change.Property == UseSyntaxHighlightingProperty)