diff --git a/ILSpy/TextView/DecompilerTextView.cs b/ILSpy/TextView/DecompilerTextView.cs index a370e4984..17a53d9dc 100644 --- a/ILSpy/TextView/DecompilerTextView.cs +++ b/ILSpy/TextView/DecompilerTextView.cs @@ -649,12 +649,13 @@ namespace ICSharpCode.ILSpy.TextView if (referenceSegment == null) { ClearLocalReferenceMarks(); } else if (referenceSegment.IsLocal || !referenceSegment.IsDefinition) { - JumpToReference(referenceSegment); textEditor.TextArea.ClearSelection(); + // cancel mouse selection to avoid AvalonEdit selecting between the new + // cursor position and the mouse position. + textEditor.TextArea.MouseSelectionMode = MouseSelectionMode.None; + + JumpToReference(referenceSegment); } - // cancel mouse selection to avoid AvalonEdit selecting between the new - // cursor position and the mouse position. - textEditor.TextArea.MouseSelectionMode = MouseSelectionMode.None; } }