Fix a boundary case for wrap off

Test Plan: vttest, 2 -> the last "*" is missing

Reviewers: billiob

Differential Revision: https://phab.enlightenment.org/D411
This commit is contained in:
Aleksandar Popadić 2013-12-25 12:03:01 +01:00 committed by Boris Faure
parent 4ed6ca9385
commit a3e67d8567
1 changed files with 7 additions and 8 deletions

View File

@ -226,17 +226,16 @@ _termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len)
unsigned char offset = 1;
ty->state.wrapnext = 0;
ty->state.cx++;
if (ty->state.cx >= (ty->w - 1)) return;
#if defined(SUPPORT_DBLWIDTH)
if (EINA_UNLIKELY(cells[ty->state.cx].att.dblwidth))
{
ty->state.cx++;
offset = 2;
}
offset = 2;
#endif
if (ty->state.cx >= (ty->w - (offset - 1)))
ty->state.cx = ty->w - offset;
ty->state.cx += offset;
if (ty->state.cx > (ty->w - offset))
{
ty->state.cx = ty->w - offset;
return;
}
}
}
}