forked from enlightenment/terminology
fix clearing lines with circular buffer.
Fixes #2263. SVN revision: 84004
This commit is contained in:
parent
48276b7cf4
commit
081f27552b
|
@ -284,11 +284,27 @@ _termpty_clear_screen(Termpty *ty, Termpty_Clear mode)
|
||||||
case TERMPTY_CLR_END:
|
case TERMPTY_CLR_END:
|
||||||
_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)));
|
||||||
|
if (l > ty->circular_offset)
|
||||||
{
|
{
|
||||||
cells = &(TERMPTY_SCREEN(ty, 0, (ty->state.cy + 1)));
|
cells = &(TERMPTY_SCREEN(ty, 0, (ty->state.cy + 1)));
|
||||||
_text_clear(ty, cells,
|
_text_clear(ty, cells,
|
||||||
ty->w * (ty->h - ty->circular_offset - 1 - ty->state.cy),
|
ty->w * (ty->circular_offset - l),
|
||||||
0, EINA_TRUE);
|
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