mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-11 08:33:02 +03:00
Use default colors instead last, when padding rows from an ANSI file
I'm not sure whether it should continue the color at the end of a row, or if it should use the default color, but before, it used the last color set in the entire file, even for earlier rows, so this is at least better than that.
This commit is contained in:
parent
426354e986
commit
3ae8af3ad7
@ -867,13 +867,12 @@ class AnsiArtDocument:
|
||||
raise ValueError("Unknown instruction type")
|
||||
document.width = width
|
||||
document.height = height
|
||||
# Fill in the rest of the lines
|
||||
# just using the last color, not sure if that's correct...
|
||||
# Pad rows to a consistent width.
|
||||
for y in range(document.height):
|
||||
for x in range(document.width - len(document.ch[y])):
|
||||
document.ch[y].append(' ')
|
||||
document.bg[y].append(bg_color)
|
||||
document.fg[y].append(fg_color)
|
||||
document.bg[y].append(default_bg)
|
||||
document.fg[y].append(default_fg)
|
||||
return document
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user