Mono.TextEditor.TextViewMargin.IsInsideSelection C# (CSharp) Method

IsInsideSelection() private method

private IsInsideSelection ( Mono.TextEditor.DocumentLocation clickLocation ) : bool
clickLocation Mono.TextEditor.DocumentLocation
return bool
		bool IsInsideSelection (DocumentLocation clickLocation)
		{
			var selection = textEditor.MainSelection;
			if (selection.SelectionMode == SelectionMode.Block) {
				int minColumn = System.Math.Min (selection.Anchor.Column, selection.Lead.Column);
				int maxColumn = System.Math.Max (selection.Anchor.Column, selection.Lead.Column);

				return selection.MinLine <= clickLocation.Line && clickLocation.Line <= selection.MaxLine &&
					minColumn <= clickLocation.Column && clickLocation.Column <= maxColumn;
			}
			return selection.Start <= clickLocation && clickLocation < selection.End;
		}