@@ -121,14 +121,13 @@ substitute_skips (Background {background_char, background_attr}) ops = do
121121 return ops
122122
123123swap_skips_for_single_column_char_span :: Char -> Attr -> SpanOps -> SpanOps
124−swap_skips_for_single_column_char_span c a = Vector.concatMap f
124+swap_skips_for_single_column_char_span c a = Vector.map f
125125 where f (Skip ow) = let txt = T.pack $ replicate ow c
126− in Vector.cons (AttributeChange a)
127− (Vector.singleton $ TextSpan ow ow (T.encodeUtf8 txt))
128− f v = Vector.singleton v
126+ in TextSpan a ow ow (T.encodeUtf8 txt)
127+ f v = v
129128
130129swap_skips_for_char_span :: Int -> Char -> Attr -> SpanOps -> SpanOps
131−swap_skips_for_char_span w c a = Vector.concatMap f
130+swap_skips_for_char_span w c a = Vector.map f
132131 where
133132 f (Skip ow) = let txt_0_cw = ow `div` w
134133 txt_0 = T.pack $ replicate txt_0_cw c
@@ -136,9 +135,8 @@ swap_skips_for_char_span w c a = Vector.concatMap f
136135 txt_1 = T.pack $ replicate txt_1_cw '…'
137136 cw = txt_0_cw + txt_1_cw
138137 txt = txt_0 `T.append` txt_1
139− in Vector.cons (AttributeChange a)
140− (Vector.singleton $ TextSpan ow cw $ T.encodeUtf8 txt)
141− f v = Vector.singleton v
138+ in TextSpan a ow cw $ T.encodeUtf8 txt
139+ f v = v
142140
143141-- | Builds a vector of row operations that will output the given picture to the terminal.
144142--
@@ -202,15 +200,14 @@ add_maybe_clipped (HorizText a text_str ow _cw) = do
202200 -- TODO: assumption that text spans are only 1 row high.
203201 s <- use skip_rows
204202 when (s < 1) $ do
205− use row_offset >>= snoc_op (AttributeChange a)
206203 left_clip <- use skip_columns
207204 right_clip <- use remaining_columns
208205 let left_clipped = left_clip > 0
209206 right_clipped = (ow - left_clip) > right_clip
210207 if left_clipped || right_clipped
211208 then let text_str' = clip_text text_str left_clip right_clip
212− in add_unclipped_text text_str'
213− else add_unclipped_text text_str
209+ in add_unclipped_text a text_str'
210+ else add_unclipped_text a text_str
214211add_maybe_clipped (VertJoin top_image bottom_image _ow oh) = do
215212 add_maybe_clipped_join "vert_join" skip_rows remaining_rows row_offset
216213 (image_height top_image)
@@ -302,9 +299,9 @@ clip_text txt left_skip right_clip =
302299 clip_for_char_width _ _ _ = error "clip_for_char_width applied to undefined"
303300 in txt''
304301
305−add_unclipped_text :: DisplayText -> BlitM s ()
306−add_unclipped_text txt = do
307− let op = TextSpan used_display_columns
302+add_unclipped_text :: Attr -> DisplayText -> BlitM s ()
303+add_unclipped_text a txt = do
304+ let op = TextSpan a used_display_columns
308305 (fromIntegral $ TL.length txt)
309306 (T.encodeUtf8 $ TL.toStrict txt)
310307 used_display_columns = wcswidth $ TL.unpack txt