Skip to content

Commit 9371075

Browse files
authored
Update SelectionMouseHandler.cs
Changed to use textArea.DefaultInputHandler.MouseSelection directly. I left a null check in place, although I can see the TextAreaDefaultInputHandler ctor currently always sets MouseSelection.
1 parent d3c3203 commit 9371075

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ICSharpCode.AvalonEdit/Editing/SelectionMouseHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private static void OnLostMouseCapture(object sender, MouseEventArgs e)
9999
TextArea textArea = (TextArea)sender;
100100
if (Mouse.Captured != textArea)
101101
{
102-
SelectionMouseHandler handler = textArea.DefaultInputHandler.NestedInputHandlers.OfType<SelectionMouseHandler>().FirstOrDefault();
102+
SelectionMouseHandler handler = textArea.DefaultInputHandler.MouseSelection as SelectionMouseHandler;
103103
if (handler != null)
104104
handler.mode = SelectionMode.None;
105105
}

0 commit comments

Comments
 (0)