mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Don’t short-circuit when there are still children to align.
This commit is contained in:
parent
fd61294642
commit
b04c844d17
@ -145,6 +145,9 @@ groupChildrenByLine ranges children = go (fromThese [] [] $ runJoin ranges) (joi
|
||||
, (lines, rest) <- span (and . bimapJoin (const True) ((< end r) . end . getRange)) children
|
||||
, length lines > 0
|
||||
= Join (That $ (r, catMaybes (Prelude.snd . unalign $ runJoin <$> lines))) : go (ls, rs) rest
|
||||
| (l:ls, r:rs) <- ranges
|
||||
, length children > 0
|
||||
= Join (These (l, []) (r, [])) : go (ls, rs) children
|
||||
| otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges
|
||||
getRange (Free (Annotated (Info range _) _)) = range
|
||||
getRange (Pure patch) | Info range _ :< _ <- getSplitTerm patch = range
|
||||
|
Loading…
Reference in New Issue
Block a user