fix scrolling bug. Closes T106
Was fixed with help from great bug report by thomasg. scroll_rev was ok
This commit is contained in:
parent
40f0dc6950
commit
f8edf059d4
|
@ -944,6 +944,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
|
|||
if (arg2 > ty->h) arg2 = ty->h;
|
||||
ty->state.scroll_y1 = arg - 1;
|
||||
ty->state.scroll_y2 = arg2;
|
||||
if ((arg == 1) && (arg2 == ty->h))
|
||||
ty->state.scroll_y2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,11 +90,11 @@ _termpty_text_scroll(Termpty *ty, Eina_Bool clear)
|
|||
}
|
||||
else
|
||||
{
|
||||
cells = &(ty->screen[end_y * ty->w]);
|
||||
cells = &(TERMPTY_SCREEN(ty, 0, end_y));
|
||||
for (y = start_y; y < end_y; y++)
|
||||
{
|
||||
cells = &(ty->screen[(y + 1) * ty->w]);
|
||||
cells2 = &(ty->screen[y * ty->w]);
|
||||
cells = &(TERMPTY_SCREEN(ty, 0, (y + 1)));
|
||||
cells2 = &(TERMPTY_SCREEN(ty, 0, y));
|
||||
termpty_cell_copy(ty, cells, cells2, ty->w);
|
||||
}
|
||||
if (clear)
|
||||
|
|
Loading…
Reference in New Issue