zero out fmt bits for dbl width chars for spare cell.

This commit is contained in:
Carsten Haitzler 2013-04-15 23:53:28 +09:00
parent ea2956b28f
commit 6ad334c864
2 changed files with 7 additions and 2 deletions

View File

@ -190,3 +190,5 @@ extern int _termpty_log_dom;
#define TERMPTY_SCREEN(Tpty, X, Y) \
Tpty->screen[X + (((Y + Tpty->circular_offset) % Tpty->h) * Tpty->w)]
#define TERMPTY_FMTCLR(Tatt) \
(Tatt).autowrapped = (Tatt).newline = (Tatt).tab = 0

View File

@ -197,8 +197,11 @@ _termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len)
#if defined(SUPPORT_DBLWIDTH)
cells[ty->state.cx].att.dblwidth = _termpty_is_dblwidth_get(ty, g);
if ((cells[ty->state.cx].att.dblwidth) && (ty->state.cx < (ty->w - 1)))
termpty_cell_codepoint_att_fill(ty, 0, cells[ty->state.cx].att,
&(cells[ty->state.cx + 1]), 1);
{
TERMPTY_FMTCLR(cells[ty->state.cx].att);
termpty_cell_codepoint_att_fill(ty, 0, cells[ty->state.cx].att,
&(cells[ty->state.cx + 1]), 1);
}
#endif
if (ty->state.wrap)
{