Refactor so x is a column index when padding row widths

This commit is contained in:
Isaiah Odhner 2023-05-09 22:36:33 -04:00
parent 349887a74e
commit bb8aff84e9

View File

@ -999,7 +999,7 @@ class AnsiArtDocument:
document.height = height
# Pad rows to a consistent width.
for y in range(document.height):
for x in range(document.width - len(document.ch[y])):
for x in range(len(document.ch[y]), document.width):
document.ch[y].append(' ')
document.bg[y].append(default_bg)
document.fg[y].append(default_fg)