1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Revert "Don’t bind tailRanges."

This reverts commit dcacd86ccb12fa11b603e0e7468614551104742e.
This commit is contained in:
Rob Rix 2016-04-11 12:04:34 -04:00
parent fe7301ba3a
commit 48264b1cb3

View File

@ -139,7 +139,7 @@ groupChildrenByLine ranges children | not (and $ null <$> ranges)
| otherwise = []
group2 :: Join These [Range] -> [AlignedDiff leaf] -> (Join These [Range], [AlignedDiff leaf], [Join These (Range, [SplitDiff leaf Info])])
group2 ranges children | Just (headRanges, _) <- unconsThese ranges
group2 ranges children | Just (headRanges, tailRanges) <- unconsThese ranges
, ~(group, l, r, rest) <- spanThese (intersects headRanges) children
, merged <- pairRangesWithLine headRanges $ fmap catMaybes (Join (uncurry These (unalign (runJoin <$> join group))))
, ~(moreRanges, moreChildren, remainingLines) <- group2 (modifyJoin (bimap (if null l && not (null r) then id else drop 1) (if null r && not (null l) then id else drop 1)) ranges) (l ++ r ++ rest)