forked from enlightenment/terminology
reflow: change _text_save_top() termpty_text_save_top()
also change prototype
This commit is contained in:
parent
b605913b1d
commit
0556318761
|
@ -28,17 +28,15 @@ _text_clear(Termpty *ty, Termcell *cells, int count, int val, Eina_Bool inherit_
|
||||||
termpty_cell_fill(ty, &src, cells, count);
|
termpty_cell_fill(ty, &src, cells, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
_text_save_top(Termpty *ty)
|
termpty_text_save_top(Termpty *ty, Termcell *cells, ssize_t w_max)
|
||||||
{
|
{
|
||||||
Termsave *ts;
|
Termsave *ts;
|
||||||
Termcell *cells;
|
|
||||||
ssize_t w;
|
ssize_t w;
|
||||||
|
|
||||||
if (ty->backmax <= 0) return;
|
if (ty->backmax <= 0) return;
|
||||||
|
|
||||||
cells = &(TERMPTY_SCREEN(ty, 0, 0));
|
w = termpty_line_length(cells, w_max);
|
||||||
w = termpty_line_length(cells, ty->w);
|
|
||||||
ts = calloc(1, sizeof(Termsave) + ((w - 1) * sizeof(Termcell)));
|
ts = calloc(1, sizeof(Termsave) + ((w - 1) * sizeof(Termcell)));
|
||||||
ts->w = w;
|
ts->w = w;
|
||||||
_termpty_text_copy(ty, cells, ts->cell, w);
|
_termpty_text_copy(ty, cells, ts->cell, w);
|
||||||
|
@ -77,7 +75,7 @@ _termpty_text_scroll(Termpty *ty)
|
||||||
{
|
{
|
||||||
if (!ty->altbuf)
|
if (!ty->altbuf)
|
||||||
{
|
{
|
||||||
_text_save_top(ty);
|
termpty_text_save_top(ty, &(TERMPTY_SCREEN(ty, 0, 0)), ty->w);
|
||||||
if (ty->cb.scroll.func) ty->cb.scroll.func(ty->cb.scroll.data);
|
if (ty->cb.scroll.func) ty->cb.scroll.func(ty->cb.scroll.data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -5,6 +5,7 @@ typedef enum _Termpty_Clear
|
||||||
TERMPTY_CLR_ALL
|
TERMPTY_CLR_ALL
|
||||||
} Termpty_Clear;
|
} Termpty_Clear;
|
||||||
|
|
||||||
|
void termpty_text_save_top(Termpty *ty, Termcell *cells, ssize_t w_max);
|
||||||
void _termpty_text_copy(Termpty *ty, Termcell *cells, Termcell *dest, int count);
|
void _termpty_text_copy(Termpty *ty, Termcell *cells, Termcell *dest, int count);
|
||||||
void _termpty_text_scroll(Termpty *ty);
|
void _termpty_text_scroll(Termpty *ty);
|
||||||
void _termpty_text_scroll_rev(Termpty *ty);
|
void _termpty_text_scroll_rev(Termpty *ty);
|
||||||
|
|
Loading…
Reference in New Issue