Skip to content

Commit

Permalink
more PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jinek committed Dec 19, 2024
1 parent 74c92d4 commit 8b11a94
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ static SelectTextWithPointerUpExtension()
{
var console = AvaloniaLocator.Current.GetService<IConsole>();
bool supportsMouse = console.SupportsMouse;
bool supportsMoveMove = console.SupportsMouseMove;
if (!supportsMouse || supportsMoveMove)
bool supportsMouseMove = console.SupportsMouseMove;
if (!supportsMouse || supportsMouseMove)
return;

SelectOnMouseRightUpProperty.Changed.SubscribeAction(OnPropertyChanged);
Expand All @@ -41,6 +41,9 @@ private static void OnPointerReleased(object sender, PointerReleasedEventArgs e)
// simplified copy of SelectableTextBlock.PointerMove
var tb = (SelectableTextBlock)sender;

if (e.InitialPressMouseButton != MouseButton.Left)
return;

Thickness padding = tb.Padding;

Point point = e.GetPosition(tb) - new Point(padding.Left, padding.Top);
Expand Down

0 comments on commit 8b11a94

Please sign in to comment.