Skip to content

Commit 5d1de37

Browse files
committed
optimize: only set Offset from SyncScrollOffset while it's not focused.
1 parent d9911b3 commit 5d1de37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Views/TextDiffView.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
755755
}
756756
else if (change.Property == SyncScrollOffsetProperty)
757757
{
758-
if (_scrollViewer != null)
758+
if (!TextArea.IsFocused && _scrollViewer != null)
759759
_scrollViewer.Offset = SyncScrollOffset;
760760
}
761761
else if (change.Property == UseSyntaxHighlightingProperty)

0 commit comments

Comments
 (0)