ICSharpCode.TextEditor.Document.SelectionManager.SelectionsOverlap C# (CSharp) Method

SelectionsOverlap() private method

private SelectionsOverlap ( ISelection s1, ISelection s2 ) : bool
s1 ISelection
s2 ISelection
return bool
        bool SelectionsOverlap(ISelection s1, ISelection s2)
        {
            return (s1.Offset <= s2.Offset && s2.Offset <= s1.Offset + s1.Length)                         ||
                (s1.Offset <= s2.Offset + s2.Length && s2.Offset + s2.Length <= s1.Offset + s1.Length) ||
                (s1.Offset >= s2.Offset && s1.Offset + s1.Length <= s2.Offset + s2.Length);
        }