billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=a3e67d856797274f3d06e6c7b93fb7b72b1dafeb
commit a3e67d856797274f3d06e6c7b93fb7b72b1dafeb Author: Aleksandar Popadić <[email protected]> Date: Wed Dec 25 12:03:01 2013 +0100 Fix a boundary case for wrap off Test Plan: vttest, 2 -> the last "*" is missing Reviewers: billiob Differential Revision: https://phab.enlightenment.org/D411 --- src/bin/termptyops.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index ebdf368..cbd100d 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -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)) + offset = 2; +#endif + ty->state.cx += offset; + if (ty->state.cx > (ty->w - offset)) { - ty->state.cx++; - offset = 2; + ty->state.cx = ty->w - offset; + return; } -#endif - if (ty->state.cx >= (ty->w - (offset - 1))) - ty->state.cx = ty->w - offset; } } } --
