mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
enhance: avoid re-calcuting highlight chunk when move mouse from stage/unstage buttons to text area
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user