fix clearing lines with circular buffer.
Fixes #2263. SVN revision: 84004
This commit is contained in:
parent
48276b7cf4
commit
081f27552b
|
@ -285,10 +285,26 @@ _termpty_clear_screen(Termpty *ty, Termpty_Clear mode)
|
||||||
_termpty_clear_line(ty, mode, ty->w);
|
_termpty_clear_line(ty, mode, ty->w);
|
||||||
if (ty->state.cy < (ty->h - 1))
|
if (ty->state.cy < (ty->h - 1))
|
||||||
{
|
{
|
||||||
|
int l = ty->h - (ty->state.cy + 1);
|
||||||
|
|
||||||
cells = &(TERMPTY_SCREEN(ty, 0, (ty->state.cy + 1)));
|
cells = &(TERMPTY_SCREEN(ty, 0, (ty->state.cy + 1)));
|
||||||
_text_clear(ty, cells,
|
if (l > ty->circular_offset)
|
||||||
ty->w * (ty->h - ty->circular_offset - 1 - ty->state.cy),
|
{
|
||||||
0, EINA_TRUE);
|
cells = &(TERMPTY_SCREEN(ty, 0, (ty->state.cy + 1)));
|
||||||
|
_text_clear(ty, cells,
|
||||||
|
ty->w * (ty->circular_offset - l),
|
||||||
|
0, EINA_TRUE);
|
||||||
|
cells = ty->screen;
|
||||||
|
_text_clear(ty, cells,
|
||||||
|
ty->w * ty->circular_offset,
|
||||||
|
0, EINA_TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_text_clear(ty, cells,
|
||||||
|
ty->w * l,
|
||||||
|
0, EINA_TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TERMPTY_CLR_BEGIN:
|
case TERMPTY_CLR_BEGIN:
|
||||||
|
|
Loading…
Reference in New Issue