Skip to content

Commit 75afb1a

Browse files
committed
swapSkipsForSingleColumnCharSpan: improve allocation behavior by using TL.take . TL.repeat instead of TL.pack . replicate
1 parent 2cb6683 commit 75afb1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Graphics/Vty/PictureToSpans.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ mergeRowUnder upperRowOps =
172172

173173
swapSkipsForSingleColumnCharSpan :: Char -> Attr -> SpanOps -> SpanOps
174174
swapSkipsForSingleColumnCharSpan c a = Vector.map f
175-
where f (Skip ow) = let txt = TL.pack $ replicate ow c
175+
where f (Skip ow) = let txt = TL.take (toEnum ow) $ TL.repeat c
176176
in TextSpan a ow ow txt
177177
f v = v
178178

0 commit comments

Comments
 (0)