Fix crash when rendering char whose wcwidth == 2 but whose bitmap fits in a single cell

This commit is contained in:
Kovid Goyal 2016-12-08 21:03:55 +05:30
parent 25aaf4331a
commit 5c160d0973

View File

@ -197,8 +197,11 @@ def render_cell(text=' ', bold=False, italic=False, underline=0, strikethrough=F
bitmap_char = render_char(text, bold, italic, width)
second = None
if width == 2:
if bitmap_char.columns > cell_width:
bitmap_char, second = split_char_bitmap(bitmap_char)
second = place_char_in_cell(second)
else:
second = render_cell()
first = place_char_in_cell(bitmap_char)