File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,6 @@ def _update_text(
232232 i = 1
233233 else :
234234 i = 0
235- old_c = 0
236235 y_offset = int (
237236 (
238237 self ._font .get_glyph (ord ("M" )).height
@@ -257,11 +256,7 @@ def _update_text(
257256 bottom = max (bottom , y - glyph .dy + y_offset )
258257 position_y = y - glyph .height - glyph .dy + y_offset
259258 position_x = x + glyph .dx
260- if (
261- not self ._text
262- or old_c >= len (self ._text )
263- or character != self ._text [old_c ]
264- ) and (glyph .width > 0 and glyph .height > 0 ):
259+ if glyph .width > 0 and glyph .height > 0 :
265260 try :
266261 # pylint: disable=unexpected-keyword-arg
267262 face = displayio .TileGrid (
@@ -286,28 +281,8 @@ def _update_text(
286281 self [i ] = face
287282 else :
288283 self .append (face )
289- elif self ._text and character == self ._text [old_c ]:
290-
291- try :
292- self [i ].position = (position_x , position_y )
293- except AttributeError :
294- self [i ].x = position_x
295- self [i ].y = position_y
296-
297284 x += glyph .shift_x
298- # TODO skip this for control sequences or non-printables.
299285 i += 1
300- old_c += 1
301- # skip all non-printables in the old string
302- while (
303- self ._text
304- and old_c < len (self ._text )
305- and (
306- self ._text [old_c ] == "\n "
307- or not self ._font .get_glyph (ord (self ._text [old_c ]))
308- )
309- ):
310- old_c += 1
311286 # Remove the rest
312287 while len (self ) > i :
313288 self .pop ()
You can’t perform that action at this time.
0 commit comments