mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Subtract length of the start of range2 to (max (end range1) (end range2))
This commit is contained in:
parent
bd1fc11726
commit
930d505128
@ -29,7 +29,7 @@ intersectsRange :: Range -> Range -> Bool
|
||||
intersectsRange range1 range2 = start range1 < end range2 && start range2 < end range1
|
||||
|
||||
subtractRange :: Range -> Range -> Range
|
||||
subtractRange range1 range2 = Range (start range1) (end range1 - rangeLength range2)
|
||||
subtractRange range1 range2 = Range (start range1) (end range1 - rangeLength (Range (start range2) (max (end range1) (end range2))))
|
||||
|
||||
|
||||
-- Instances
|
||||
|
Loading…
Reference in New Issue
Block a user