on master help sign in
addMaybeClippedJoin: instead of raising an exception when the join is totally clipped, just reduce the clip amount and continue
e483f08Jonathan Daugherty
src/Graphics/Vty/PictureToSpans.hs+1−1
@@ -311,7 +311,7 @@ addMaybeClippedJoin name skip remaining offset i0Dim i0 i1 size = do
311 when (state^.remaining <= 0) $ fail $ name ++ " with remaining <= 0"
311 when (state^.remaining <= 0) $ fail $ name ++ " with remaining <= 0"
312 case state^.skip of
312 case state^.skip of
313 s -- TODO: check if clipped in other dim. if not use addUnclipped
313 s -- TODO: check if clipped in other dim. if not use addUnclipped
314− | s > size -> fail $ name ++ " on fully clipped"
314+ | s > size -> put $ state & skip -~ size
315 | s == 0 -> if state^.remaining > i0Dim
315 | s == 0 -> if state^.remaining > i0Dim
316 then do
316 then do
317 addMaybeClipped i0
317 addMaybeClipped i0