mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 05:41:54 +03:00
Fix squashed columns when ANSI file jumps horizontally
Now I can load the font template that I made with generate_font_template.py
This commit is contained in:
parent
bd4bfa93e1
commit
77f631e396
@ -872,11 +872,15 @@ class AnsiArtDocument:
|
||||
document.bg.append([])
|
||||
document.fg.append([])
|
||||
else:
|
||||
while len(document.ch[y]) <= x:
|
||||
document.ch[y].append(' ')
|
||||
document.bg[y].append(default_bg)
|
||||
document.fg[y].append(default_fg)
|
||||
document.ch[y][x] = char
|
||||
document.bg[y][x] = bg_color
|
||||
document.fg[y][x] = fg_color
|
||||
x += 1
|
||||
width = max(x, width)
|
||||
document.ch[y].append(char)
|
||||
document.bg[y].append(bg_color)
|
||||
document.fg[y].append(fg_color)
|
||||
elif isinstance(instruction, stransi.SetColor) and instruction.color is not None:
|
||||
# Color (I'm not sure why instruction.color would be None, but it's typed as Optional[Color])
|
||||
# (maybe just for initial state?)
|
||||
|
Loading…
Reference in New Issue
Block a user