outputPicture: factor out vector/list conversions

This commit is contained in:
Jonathan Daugherty 2018-08-27 09:12:25 -07:00
parent d8ead321f9
commit 4953368aff

View File

@ -177,8 +177,7 @@ outputPicture dc pic = liftIO $ do
Nothing -> replicate (fromEnum $ regionHeight $ affectedRegion ops) True
Just previousOps -> if affectedRegion previousOps /= affectedRegion ops
then replicate (displayOpsRows ops) True
else zipWith (/=) (Vector.toList previousOps)
(Vector.toList ops)
else Vector.toList $ Vector.zipWith (/=) previousOps ops
-- build the Write corresponding to the output image
out = (if manipCursor then writeHideCursor dc else mempty)
`mappend` writeOutputOps urlsEnabled dc initialAttr diffs ops