fix: unable to access the Stage/Unstage buttons in diff viewer when line wrap is enabled (#481)

* disable line wrap in side-by-side diff mode
This commit is contained in:
leo 2024-09-17 22:26:35 +08:00
parent bc633e4085
commit 934d784d40
No known key found for this signature in database
2 changed files with 12 additions and 2 deletions

View file

@ -519,7 +519,17 @@ namespace SourceGit.Views
private void OnTextViewPointerMoved(object sender, PointerEventArgs e)
{
if (EnableChunkSelection && sender is TextView view)
{
var chunk = SelectedChunk;
if (chunk != null)
{
var rect = new Rect(0, chunk.Y, Bounds.Width, chunk.Height);
if (rect.Contains(e.GetPosition(this)))
return;
}
UpdateSelectedChunk(e.GetPosition(view).Y + view.VerticalOffset);
}
}
private void OnTextViewPointerWheelChanged(object sender, PointerWheelEventArgs e)