enhance: avoid re-calcuting highlight chunk when move mouse from stage/unstage buttons to text area
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

This commit is contained in:
leo 2024-09-29 12:11:09 +08:00
parent 99c2ffeef4
commit e945367b28
No known key found for this signature in database

View file

@ -513,7 +513,17 @@ namespace SourceGit.Views
private void OnTextViewPointerEntered(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 OnTextViewPointerMoved(object sender, PointerEventArgs e)